/* Design tokens — hierarchy-first shell */
:root {
    --bg-app: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --radius: 10px;
    --radius-sm: 8px;
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --header-slim-h: 48px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg-app);
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

.layout-shell {
    min-height: 100vh;
}

/* Sidebar — Warehouse-style: dark column, row dividers, icons, collapsible <details> */
.sidebar,
.sidebar * {
    box-sizing: border-box;
}

.sidebar--warehouse {
    width: 260px !important;
    position: fixed !important;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #111827;
    color: #f8fafc;
}

.sidebar--warehouse ul,
.sidebar--warehouse li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.sidebar-nav {
    padding: 0 0 20px;
}

.sidebar-section-label {
    margin: 0;
    padding: 16px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.sidebar-nav-root {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-nav-item {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-row-link {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    line-height: 1.3;
    overflow-wrap: anywhere;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-row-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.sidebar-row-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
}

.sidebar-row-icon .sidebar-icon-svg {
    display: block;
}

.sidebar-row-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

/* Collapsible groups */
.sidebar-disclosure {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-disclosure-summary {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    list-style: none;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-disclosure-summary::-webkit-details-marker {
    display: none;
}

.sidebar-disclosure-summary::marker {
    display: none;
}

.sidebar-disclosure-summary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.sidebar-disclosure.sidebar-nav-group-active > .sidebar-disclosure-summary {
    color: #e2e8f0;
}

.sidebar-chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    color: #94a3b8;
}

.sidebar-chevron .sidebar-icon-svg {
    transition: transform 0.2s ease;
}

.sidebar-disclosure[open] .sidebar-chevron .sidebar-icon-svg {
    transform: rotate(180deg);
}

.sidebar-subnav {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-subnav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-subnav li:last-child {
    border-bottom: none;
}

.sidebar-sublink {
    display: block !important;
    padding: 10px 16px 10px 48px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    line-height: 1.35;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-sublink:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.sidebar-link.active,
.sidebar-row-link.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

.sidebar-sublink.sidebar-link.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

.sidebar-row-link.active .sidebar-row-icon,
.sidebar-row-link.active .sidebar-icon-svg {
    color: #ffffff;
}

.sidebar-link:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    flex-shrink: 0;
    display: flex;
    color: #ffffff;
}

.sidebar-brand-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.app-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.app-logo-frame--transparent {
    background: transparent;
    box-shadow: none;
}

.app-logo-frame--white {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.app-logo-frame--sidebar {
    width: 44px;
    height: 44px;
    padding: 4px;
    border-radius: 12px;
}

.sidebar-brand-text {
    flex: 1;
    min-width: 0;
}

.sidebar-brand-text h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.main-area {
    margin-left: 260px !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
}

/* Slim global header — org + user only */
.top-header--slim {
    flex-shrink: 0;
    height: var(--header-slim-h);
    min-height: var(--header-slim-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.top-header-logo {
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.app-logo-frame--header {
    width: 36px;
    height: 36px;
    padding: 4px;
}

.top-header-org {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
}

.content-wrap {
    flex: 1;
    padding: var(--space-md) var(--space-xl) var(--space-lg);
    max-width: 1480px;
}

/* In-page header: hierarchy (section → title → subtitle) + toolbar */
.page-header {
    margin-bottom: var(--space-md);
}

.page-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
}

.page-header-text {
    flex: 1;
    min-width: 200px;
}

.page-kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.page-heading {
    margin: 0 0 4px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

.page-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    max-width: 60ch;
    line-height: 1.45;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 2px;
}

.page-toolbar .btn {
    margin: 0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.page-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.page-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.metric {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
}

a.metric {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.metric:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.metric-label {
    margin: 0 0 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.metric-value {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-footer {
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-muted);
    font-size: 12px;
}

/* Legacy: prefer page-body + .card; keep .container as padded surface if needed */
.container {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

h1, h2, h3 {
    margin-top: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.btn-sm {
    padding: 6px 11px;
    font-size: 12px;
}

/* Primary = create / submit / main forward action */
.btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Secondary = neutral navigation / supporting actions */
.btn-secondary {
    background: var(--surface);
    color: #334155;
    border-color: var(--border);
}

.btn-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
}

/* Edit / caution */
.btn-warning {
    background: #d97706;
    color: #fff;
    border-color: #b45309;
}

.btn-warning:hover {
    background: #b45309;
    color: #fff;
}

/* Destructive */
.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #b91c1c;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.btn-ghost-danger {
    background: transparent;
    color: #b91c1c;
    border-color: transparent;
    font-weight: 600;
}

.btn-ghost-danger:hover {
    background: #fef2f2;
    color: #991b1b;
}

.table-wrap {
    margin-top: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}

th, td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

thead th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8fafc;
}

.actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* Cleaner action menus inside tables (details/summary) */
.actions-menu {
    position: relative;
}

.actions-menu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.actions-menu summary::-webkit-details-marker {
    display: none;
}

.actions-menu-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 8px;
}

.actions-menu[open] .actions-menu-body {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 160px;
    z-index: 50;
}

.btn-light {
    background: #f8fafc;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-light:hover {
    background: #f1f5f9;
    color: var(--text);
}

.text-right {
    text-align: right;
}

/* Products catalog table: numeric alignment + manage column */
.products-catalog-table th.text-right,
.products-catalog-table td.text-right {
    text-align: right;
}

.products-catalog-table td.text-right {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.products-catalog-table td.manage-col,
.products-catalog-table th.manage-col {
    min-width: 200px;
    vertical-align: middle;
}

/* Let row hover stack above the next row so the ••• menu is not clipped */
.products-catalog-table tbody tr {
    position: relative;
    z-index: 0;
}

.products-catalog-table tbody tr:hover {
    z-index: 5;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.product-dropdown {
    position: relative;
    flex-shrink: 0;
}

.product-dropdown-toggle {
    cursor: pointer;
    min-width: 2.25rem;
    padding-left: 10px;
    padding-right: 10px;
}

.product-dropdown-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 2px;
    min-width: 148px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    z-index: 200;
    flex-direction: column;
    gap: 0;
}

.product-dropdown:hover .product-dropdown-menu {
    display: flex;
}

.product-dropdown-menu li {
    margin: 0;
    padding: 0;
    display: block;
}

.product-dropdown-menu a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.product-dropdown-menu a:hover {
    background: #f5f5f5;
}

.product-dropdown-menu a.danger {
    color: #dc2626;
}

/* Forms: use .form-stack on add/edit pages for comfortable line length */
.form-stack {
    max-width: 560px;
}

form:not(.form-full):not(.search-form) {
    max-width: 560px;
}

label {
    font-weight: 600;
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
.input-select {
    width: 100%;
    padding: 9px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.input-textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    resize: vertical;
}

.logo-preview-wrap {
    margin-top: 10px;
}

.logo-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

.app-logo-frame--preview {
    width: 110px;
    height: 110px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.logo-background-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.logo-background-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
}

.logo-background-option input[type="radio"] {
    margin: 0;
}

.message {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.message-success {
    background: #e8f8ee;
    color: #17643a;
}

.message-error {
    background: #fdecea;
    color: #8a1c1f;
}

.message-warn {
    background: #fff8e6;
    color: #946200;
}

/* Planned equipment builder: stay clickable even if an ancestor uses opacity/pointer-events tricks */
.intake-interactive-zone {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.row-overdue {
    background: #ffe8e8 !important;
}

.badge-overdue {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.badge-paid {
    background: #e8f8ee;
    color: #17643a;
}

.badge-partial {
    background: #fff8e6;
    color: #946200;
}

.badge-unpaid {
    background: #fdecea;
    color: #8a1c1f;
}

.badge-voided {
    background: #fee2e2;
    color: #991b1b;
}

.chip.badge-paid,
.chip.badge-partial,
.chip.badge-unpaid {
    text-transform: capitalize;
    font-weight: 700;
}

.chip.badge-voided {
    text-transform: capitalize;
    font-weight: 700;
}

.row-balance-due {
    background: #fff8f0 !important;
}

/* POS layout styles */
.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card-pad {
    padding: var(--space-md) var(--space-lg);
}

.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
    background: #fafafa;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.card-header .muted {
    font-size: 13px;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-md);
}

.dashboard-panel {
    grid-column: span 12;
}

.dashboard-panel--wide {
    grid-column: span 12;
}

.dashboard-panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.dashboard-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.dashboard-notification-list,
.dashboard-list,
.dashboard-action-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dashboard-notification-item,
.dashboard-list-item,
.dashboard-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafafa;
    text-decoration: none;
    color: inherit;
}

.dashboard-list-item:hover,
.dashboard-action-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.dashboard-notification-body {
    min-width: 0;
    flex: 1;
}

.dashboard-notification-link,
.dashboard-list-text {
    display: block;
    color: var(--text);
    text-decoration: none;
    line-height: 1.45;
}

.dashboard-notification-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.dashboard-list-count {
    flex-shrink: 0;
    min-width: 32px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-action-badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e0e7ff;
    color: #3730a3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.dashboard-action-text strong {
    font-size: 14px;
}

.dashboard-action-text span {
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-snapshot-grid {
    margin-bottom: 0;
}

.dashboard-snapshot-card--alert {
    border-color: #fecaca;
    background: #fffafa;
}

.dashboard-snapshot-meta {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.dashboard-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
}

.dashboard-queue-column h3 {
    margin: 0 0 8px;
    font-size: 13px;
}

.dashboard-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-header-actions__group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-header-actions__group--primary {
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-section-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dashboard-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-section-subtitle {
    margin: 4px 0 0;
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-summary-strip,
.dashboard-operational-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.dashboard-summary-card,
.dashboard-workbench-stat,
.dashboard-operational-card {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.dashboard-summary-card:hover,
a.dashboard-workbench-stat:hover,
a.dashboard-operational-card:hover,
a.dashboard-pipeline-stage:hover,
a.dashboard-action-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.dashboard-summary-card.is-disabled,
.dashboard-pipeline-stage.is-disabled {
    cursor: default;
    pointer-events: none;
}

.dashboard-summary-card--alert,
.dashboard-workbench-stat--alert,
.dashboard-operational-card--alert,
.dashboard-pipeline-stage--alert {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.dashboard-summary-card--warning,
.dashboard-workbench-stat--warning,
.dashboard-operational-card--warning,
.dashboard-pipeline-stage--warning {
    border-color: #fed7aa;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.dashboard-summary-card--success,
.dashboard-operational-card--success {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.dashboard-summary-card--info,
.dashboard-workbench-stat--info,
.dashboard-pipeline-stage--info {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.dashboard-summary-label {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dashboard-summary-value {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.dashboard-summary-meta {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.dashboard-command-card {
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-command-card .card-header {
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.dashboard-command-card--pipeline {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-pipeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-pipeline::before {
    content: "";
    position: absolute;
    left: 32px;
    right: 32px;
    top: 32px;
    height: 2px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.22), rgba(148, 163, 184, 0.5), rgba(148, 163, 184, 0.22));
    z-index: 0;
}

.dashboard-pipeline-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 164px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-pipeline-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-pipeline-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dashboard-pipeline-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.dashboard-pipeline-meta {
    display: block;
    margin-top: auto;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.dashboard-pipeline-buckets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.dashboard-pipeline-bucket {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.dashboard-pipeline-bucket__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.dashboard-pipeline-bucket__header h3 {
    margin: 0;
    font-size: 13px;
}

.dashboard-workbench-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 16px;
    align-items: start;
}

.dashboard-workbench-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.dashboard-workbench-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-action-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-action-group {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfdff;
}

.dashboard-action-group__header {
    margin-bottom: 10px;
}

.dashboard-action-group__header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.dashboard-action-group__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.dashboard-action-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-grid--alerts {
    align-items: start;
}

.dashboard-grid--alerts .dashboard-panel {
    min-width: 0;
}

.dashboard-notification-item {
    align-items: flex-start;
    background: #fff;
}

.dashboard-notification-body {
    display: flex;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.dashboard-notification-marker {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: #2563eb;
    flex-shrink: 0;
}

.dashboard-notification-content {
    min-width: 0;
    flex: 1;
}

.dashboard-list-item--compact {
    padding: 10px 12px;
}

.dashboard-list-text strong {
    display: block;
    font-size: 13px;
}

.dashboard-list-text span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-operational-card {
    min-height: 128px;
}

@media (max-width: 1260px) {
    .dashboard-pipeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-pipeline::before {
        display: none;
    }

    .dashboard-pipeline-buckets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .dashboard-workbench-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid--alerts {
        grid-template-columns: 1fr;
    }

    .dashboard-grid--alerts .dashboard-panel {
        grid-column: span 12;
    }
}

@media (max-width: 760px) {
    .dashboard-header-actions {
        justify-content: flex-start;
    }

    .dashboard-header-actions__group--primary {
        padding-left: 0;
        border-left: 0;
    }

    .dashboard-workbench-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-pipeline,
    .dashboard-pipeline-buckets {
        grid-template-columns: 1fr;
    }
}

.card .table-wrap {
    border: none;
    border-radius: 0;
}

.card > .table-wrap {
    border-top: 1px solid var(--border);
}

.muted {
    color: var(--text-muted);
}

/* Status chips (product type, etc.) */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.chip-sale {
    background: #dbeafe;
    color: #1e40af;
}

.chip-rental {
    background: #ffedd5;
    color: #9a3412;
}

.chip-both {
    background: #e0e7ff;
    color: #3730a3;
}

.chip-yes {
    background: #ecfdf5;
    color: #047857;
}

.chip-no {
    background: #f1f5f9;
    color: var(--text-muted);
}

.chip-neutral {
    background: #f1f5f9;
    color: #475569;
    text-transform: none;
    font-weight: 600;
    font-size: 12px;
}

.chip-rental-status-active {
    background: #dbeafe;
    color: #1e3a8a;
}

.chip-rental-status-returned {
    background: #f1f5f9;
    color: #64748b;
}

/* Product detail hub */
.detail-dl {
    display: grid;
    grid-template-columns: minmax(100px, 140px) 1fr;
    gap: 8px 18px;
    margin: 0;
}

.detail-dl dt {
    margin: 0;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
}

.detail-dl dd {
    margin: 0;
}

.detail-inline-list {
    margin: 0;
    padding-left: 18px;
}

.detail-inline-list li {
    margin-bottom: 6px;
}

.text-right {
    text-align: right;
}

.qty-input {
    width: 80px;
    padding: 6px;
}

/* Dashboard operational cards */
.dash-ops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.dash-op-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.dash-op-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.dash-op-card--alert {
    border-color: #fecaca;
    background: #fffafa;
}

.dash-op-card--ok {
    border-left: 3px solid #22c55e;
}

.dash-op-kicker {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.dash-op-value {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.dash-op-meta {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.link-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
}

@media (min-width: 1100px) {
    .dashboard-panel {
        grid-column: span 6;
    }

    .dashboard-panel--wide {
        grid-column: span 12;
    }
}

.link-tile {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafafa;
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s ease, border-color 0.12s ease;
}

.link-tile:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.link-tile-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-tile-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.link-tile-text span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Product list filters */
.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: flex-end;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.product-filters label {
    margin: 0 0 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.filter-field {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.filter-field-grow {
    flex: 1;
    min-width: 180px;
}

.chip-stock-ok {
    background: #ecfdf5;
    color: #047857;
}

.chip-stock-low {
    background: #fffbeb;
    color: #b45309;
}

.chip-stock-out {
    background: #fef2f2;
    color: #b91c1c;
}

.action-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.action-cluster .sep {
    color: var(--border);
    user-select: none;
}

/* POS transactional layout */
.pos-transaction {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(340px, 420px);
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 960px) {
    .pos-transaction {
        grid-template-columns: 1fr;
    }
}

.pos-customer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.pos-customer-bar label {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.pos-customer-bar .input-select {
    max-width: 280px;
}

.pos-cart-panel {
    border: 2px solid #1e40af;
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(30, 64, 175, 0.12);
    overflow: hidden;
    background: var(--surface);
}

.pos-cart-panel .card-header {
    background: #1e3a8a;
    color: #fff;
    border-bottom: none;
}

.pos-cart-panel .card-header .card-title {
    color: #fff;
}

.pos-cart-panel .card-pad {
    min-height: 220px;
}

.pos-cart-panel .pos-cart-total {
    font-size: 1.35rem;
    font-weight: 800;
    padding: var(--space-md) var(--space-lg);
    background: #eff6ff;
    border-top: 1px solid var(--border);
    text-align: right;
}

.pos-product-search {
    margin: 0;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.pos-product-search input {
    width: 100%;
    box-sizing: border-box;
}

.pos-product-scroll {
    max-height: min(52vh, 520px);
    overflow-y: auto;
}

.pos-product-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.pos-product-row:hover {
    background: #f8fafc;
}

.pos-product-row.is-hidden {
    display: none;
}

.pos-product-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.pos-serial-select {
    max-width: 160px;
    font-size: 12px;
    padding: 6px 8px;
}

.cart-line-table {
    width: 100%;
    font-size: 13px;
}

.cart-line-table th,
.cart-line-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

/* Serial inventory summary */
.serial-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.serial-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    font-size: 13px;
}

.serial-pill strong {
    font-size: 1.1rem;
}

.chip-serial-in-stock {
    background: #ecfdf5;
    color: #047857;
}

.chip-serial-rented {
    background: #ffedd5;
    color: #9a3412;
}

.chip-serial-sold,
.chip-serial-other {
    background: #f1f5f9;
    color: #475569;
}

.rental-kpi-row {
    margin-bottom: var(--space-md);
}

a.rental-kpi-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

a.rental-kpi-link:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
}

.rental-kpi-link--warn {
    border-color: #fdba74;
    background: #fff7ed;
}

a.rental-kpi-link--warn:hover {
    border-color: #fb923c;
    background: #ffedd5;
}

.rental-kpi-link--current {
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
    background: #eef2ff;
}

.rental-kpi-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Support / utility admin pages (categories, attributes) */
.utility-page {
    max-width: 720px;
}

.utility-page .card-pad,
.utility-page .card.card-pad form {
    font-size: 13px;
}

.utility-page h2,
.utility-page .card-title {
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.search-form {
    margin-bottom: 14px;
}

.search-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.12);
    padding: 24px;
}

.login-hint {
    margin-top: 12px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .sidebar {
        position: static !important;
        width: 100% !important;
        height: auto;
    }

    .main-area {
        margin-left: 0 !important;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }
}

/* Survey / accreditation presentation */
.survey-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.3;
}
.survey-badge--verified {
    background: #dcfce7;
    color: #166534;
}
.survey-badge--pending {
    background: #fef9c3;
    color: #854d0e;
}
.survey-badge--missing {
    background: #fee2e2;
    color: #991b1b;
}
.survey-badge--review {
    background: #dbeafe;
    color: #1e40af;
}
.survey-badge--neutral {
    background: #e2e8f0;
    color: #334155;
}

/* Cases list (patient workflow) */
.card-cases-list .card-header {
    padding-bottom: 10px;
}

.table-wrap-cases {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

table.table-cases {
    font-size: 13px;
}

table.table-cases thead th {
    background: #f8fafc;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

table.table-cases tbody tr {
    transition: background 0.12s ease;
}

table.table-cases tbody tr:nth-child(even) {
    background: #fafbfc;
}

table.table-cases tbody tr:hover {
    background: #f0f7ff;
}

table.table-cases .td-case-num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1e3a8a;
}

table.table-cases .td-patient {
    font-weight: 600;
}

table.table-cases .td-muted {
    color: var(--text-muted);
}

table.table-cases .td-user {
    font-size: 12px;
    max-width: 200px;
    word-break: break-word;
}

table.table-cases .text-unassigned {
    color: var(--text-muted);
    font-style: italic;
}

table.table-cases .td-date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

table.table-cases .td-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
}

table.table-cases .th-actions,
table.table-cases .td-actions {
    text-align: right;
    white-space: nowrap;
}

table.table-cases .td-actions {
    display: table-cell;
}

table.table-cases .td-actions .btn {
    margin-left: 6px;
}

table.table-cases .td-actions .btn:first-child {
    margin-left: 0;
}

/* Case workflow status chips */
.chip-case-status-new {
    background: #e0f2fe;
    color: #0369a1;
}

.chip-case-status-intake {
    background: #fef3c7;
    color: #b45309;
}

.chip-case-status-verified {
    background: #dbeafe;
    color: #1d4ed8;
}

.chip-case-status-approved {
    background: #d1fae5;
    color: #047857;
}

.chip-case-status-ready {
    background: #e0e7ff;
    color: #4338ca;
}

.chip-case-status-shipped {
    background: #cffafe;
    color: #0e7490;
}

.chip-case-status-completed {
    background: #ecfdf5;
    color: #15803d;
}

.chip-case-status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.chip-priority-low {
    background: #f1f5f9;
    color: #64748b;
    text-transform: none;
    font-weight: 600;
    font-size: 11px;
}

.chip-priority-normal {
    background: #eff6ff;
    color: #2563eb;
    text-transform: none;
    font-weight: 600;
    font-size: 11px;
}

.chip-priority-high {
    background: #fff7ed;
    color: #c2410c;
    text-transform: none;
    font-weight: 600;
    font-size: 11px;
}

.chip-priority-urgent {
    background: #fef2f2;
    color: #b91c1c;
    text-transform: none;
    font-weight: 700;
    font-size: 11px;
}

/* Case detail — premium workflow UI (presentation only) */
.case-view-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 20px;
    align-items: start;
}

.case-view-layout > .case-view-superadmin-banner {
    grid-column: 1 / -1;
}

.case-view-superadmin-banner {
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 10px;
    border: 1px solid #c4b5fd;
    background: #f5f3ff;
    color: #5b21b6;
    font-size: 13px;
    font-weight: 600;
}

.case-view-wf-next-panel {
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.case-view-wf-next-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.case-view-wf-next-panel-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: var(--text-muted);
}

.case-view-wf-next-panel-value {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.case-view-wf-next-panel-hint {
    margin: 0;
    font-size: 13px;
}

.case-view-wf-next-panel-form {
    margin: 0;
}

.case-view-wf-fieldset {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 12px 14px 14px;
    margin: 0 0 var(--space-md);
    min-width: 0;
}

.case-view-wf-fieldset--inline {
    display: block;
    padding: 4px 0;
    margin: 0;
}

.case-view-wf-fieldset:disabled {
    opacity: 0.55;
    pointer-events: none;
}

.case-view-wf-fieldset-legend {
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.case-view-wf--current-step {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28);
    border-radius: 12px;
}

.case-view-wf--super-dim {
    opacity: 0.52;
    filter: saturate(0.88);
}

/* Guided sales / admin intake: hide secondary panels until workflow override */
.case-view-guided-intake-hidden {
    display: none !important;
}

body.case-view--guided-intake .case-view-layout {
    grid-template-columns: 1fr;
}

body.case-view--guided-verifier .case-view-layout {
    grid-template-columns: 1fr;
}

body.case-view--guided-operations .case-view-layout {
    grid-template-columns: 1fr;
}

body.case-view--guided-billing .case-view-layout {
    grid-template-columns: 1fr;
}

.case-intake-send-verifier .case-intake-complete-form {
    margin-top: 8px;
}

.case-intake-planned-table {
    font-size: 14px;
}

/* Collapsible workflow sections (case view) */
details.case-view-wf-step-details {
    border: 0;
    margin: 0;
    padding: 0;
}

details.case-view-wf-step-details > summary.case-view-wf-step-summary {
    list-style: none;
    cursor: pointer;
    padding: var(--space-md) var(--space-md) 0;
    margin: 0;
}

details.case-view-wf-step-details > summary.case-view-wf-step-summary::-webkit-details-marker {
    display: none;
}

details.case-view-wf-step-details > summary.case-view-wf-step-summary::marker {
    content: "";
}

.case-view-wf-step-summary-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px 16px;
    flex-wrap: wrap;
}

.case-view-wf-step-summary-inner > .case-view-wf-step-badge {
    flex-shrink: 0;
    margin-top: 4px;
}

.case-view-wf-step-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.04);
}

.case-view-wf-step-heading {
    margin: 0 0 6px;
}

.case-view-wf-step-body {
    padding: 0 0 var(--space-sm);
}

.case-view-wf-step-body > .card-pad:first-child {
    padding-top: var(--space-sm);
}

.case-view-wf-continue-wrap {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    border-top: 1px solid var(--border);
    margin-top: var(--space-sm);
}

.case-view-compliance-item-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.case-view-compliance-item-text {
    flex: 1 1 220px;
    min-width: 0;
}

.case-view-compliance-item-pf {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.case-intake-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.case-intake-sequence {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: intake-seq;
}

.case-intake-sequence-step {
    counter-increment: intake-seq;
    margin: 0 0 var(--space-md);
    padding: 0;
}

.case-intake-sequence-step > .case-intake-step-title::before {
    content: counter(intake-seq) ". ";
    font-weight: 700;
}

.case-intake-sequence-step:last-child {
    margin-bottom: 0;
}

.case-intake-step-title {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 6px;
    color: var(--text);
}

.case-intake-step-hint {
    margin: 0 0 12px;
    font-size: 13px;
}

.case-intake-step-fieldset {
    margin-bottom: 0;
}

.case-intake-checklist-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.case-intake-status-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 520px;
}

@media (max-width: 1100px) {
    .case-view-layout {
        grid-template-columns: 1fr;
    }
}

.case-view-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.case-view-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border);
}

.case-view-help {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.case-view-wf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.case-view-wf-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.case-view-wf-badge--ready {
    background: #dcfce7;
    color: #166534;
}

.case-view-wf-badge--pending {
    background: #fef9c3;
    color: #854d0e;
}

.case-view-wf-badge--blocked {
    background: #fecaca;
    color: #7f1d1d;
}

.case-view-wf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px 18px;
    margin-bottom: 16px;
}

.case-view-wf-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-muted);
}

.case-view-wf-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.case-view-next-block {
    padding: 14px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    margin-bottom: 14px;
}

.case-view-next-action {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
}

.case-view-mini-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #1e40af;
    margin: 6px 8px 0 0;
}

.case-view-mini-badge--muted {
    background: #f1f5f9;
    color: #64748b;
}

.case-view-missing-block {
    margin-bottom: 14px;
}

.case-view-missing-list {
    margin: 6px 0 0;
    padding-left: 1.1rem;
}

.case-view-mc--complete {
    color: #166534;
    font-weight: 600;
}

.case-view-mc--missing {
    color: #b91c1c;
    font-weight: 600;
}

.case-view-trigger-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.case-view-wf-progress {
    padding: 12px 0 4px;
}

.case-view-wf-bar {
    display: flex;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
    margin-bottom: 10px;
    gap: 2px;
}

.case-view-wf-bar-seg {
    flex: 1;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}

.case-view-wf-bar-seg.is-done {
    background: var(--color-primary, #2563eb);
}

.case-view-wf-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
}

.case-view-step-chip {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.75;
}

.case-view-step-chip.is-active {
    opacity: 1;
    border: 1px solid var(--color-primary, #2563eb);
    font-weight: 700;
}

.case-view-wf-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.case-view-sidebar {
    position: sticky;
    top: 12px;
    padding: 18px 18px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.case-view-sidebar-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
}

.case-view-sidebar-score {
    font-size: 28px;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: -0.02em;
}

.case-view-sidebar-list {
    margin: 6px 0 0;
    padding-left: 1rem;
    font-size: 12px;
    color: var(--text-muted);
}

.case-view-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.case-view-status-badge--verified {
    background: #dcfce7;
    color: #166534;
}

.case-view-status-badge--pending {
    background: #fef9c3;
    color: #854d0e;
}

.case-view-status-badge--missing {
    background: #fee2e2;
    color: #991b1b;
}

.case-view-status-badge--blocked {
    background: #fecaca;
    color: #7f1d1d;
}

.case-view-status-badge--ready-for-review {
    background: #dbeafe;
    color: #1e40af;
}

.case-view-subsection {
    padding-top: 4px;
}

/* Visual section order (DOM may differ) */
.case-view-main > #case-section-summary {
    order: 10;
}

.case-view-main > #workflow-control-panel {
    order: 20;
}

.case-view-main > #case-view-not-ready {
    order: 25;
}

.case-view-main > #section-intake {
    order: 30;
}

.case-view-main > #insurance {
    order: 40;
}

.case-view-main > #documents {
    order: 50;
}

.case-view-main > #compliance-fields {
    order: 60;
}

.case-view-main > #section-fulfillment {
    order: 70;
}

.case-view-main > #section-followup {
    order: 75;
}

.case-view-main > #billing {
    order: 80;
}

.case-view-main > #status-history {
    order: 85;
}

.case-view-main > #checklist {
    order: 90;
}

.case-view-main > #tasks {
    order: 100;
}

.case-view-main > #section-complaints {
    order: 105;
}

.case-view-main > #section-qa {
    order: 108;
}

.case-view-main > #case-view-notes-list {
    order: 110;
}

.case-view-req {
    color: #b91c1c;
    font-weight: 800;
}

.case-view-input-warn {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.case-view-inline-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #b91c1c;
}

/* Workflow advance blocked — jump target highlight */
.case-view-guidance-target {
    outline: 3px solid #dc2626 !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.12), 0 4px 18px rgba(15, 23, 42, 0.08) !important;
    border-color: #fca5a5 !important;
    border-radius: 12px;
    animation: case-view-guidance-pulse 1.6s ease-in-out 2;
}

@keyframes case-view-guidance-pulse {
    0%, 100% { outline-color: #dc2626; }
    50% { outline-color: #f87171; }
}

/* Eligibility / insurance card — data state (Required / Pending Verification / Verified) */
.case-view-insurance-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    justify-content: space-between;
}

.case-view-insurance-title {
    margin: 0;
    flex: 1 1 auto;
}

.case-view-wf-section-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.case-view-wf-section-badge--required {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.case-view-wf-section-badge--pending {
    color: #a16207;
    background: #fffbeb;
    border-color: #fde68a;
}

.case-view-wf-section-badge--verified {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.case-view-wf-section-next {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.case-view-insurance-meta {
    margin-top: 6px;
    font-size: 12px;
}

.case-view-insurance-status--required {
    border-left: 4px solid #dc2626;
    background: linear-gradient(to right, rgba(254, 242, 242, 0.72) 0%, transparent 52%);
}

.case-view-insurance-status--pending {
    border-left: 4px solid #ca8a04;
    background: linear-gradient(to right, rgba(254, 252, 232, 0.85) 0%, transparent 52%);
}

.case-view-insurance-status--verified {
    border-left: 4px solid #16a34a;
    background: linear-gradient(to right, rgba(240, 253, 244, 0.75) 0%, transparent 52%);
}

/* Workflow advance blocked on this card, but insurance data is OK (e.g. checklist) — avoid harsh red */
.case-view-guidance-target--workflow-block {
    outline: 3px solid #d97706 !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.12), 0 4px 18px rgba(15, 23, 42, 0.08) !important;
    border-color: #fcd34d !important;
    border-radius: 12px;
    animation: case-view-guidance-pulse-amber 1.6s ease-in-out 2;
}

@keyframes case-view-guidance-pulse-amber {
    0%, 100% { outline-color: #d97706; }
    50% { outline-color: #fbbf24; }
}

/* Compliance snapshot: jump links + inline section hints */
.grid-two > .case-view-compliance-inline-wrap {
    grid-column: 1 / -1;
}

.case-view-compliance-fix-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.case-view-compliance-fix-buttons .btn {
    font-size: 12px;
    padding: 6px 10px;
}

.case-view-compliance-missing-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.case-view-compliance-missing-item {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.case-view-compliance-missing-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.case-view-compliance-missing-text {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 6px;
    color: var(--text, #1e293b);
}

.case-view-compliance-jump--small {
    font-size: 12px !important;
    padding: 5px 10px !important;
}

.case-view-compliance-inline-wrap {
    margin-bottom: 14px;
}

.case-view-compliance-inline {
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid transparent;
}

.case-view-compliance-inline--block {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.case-view-compliance-inline--warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
}

.case-view-compliance-inline-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: 0.9;
}

.case-view-compliance-inline-list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 13px;
    line-height: 1.5;
}

.case-view-guidance-target--active {
    border: 2px solid #ff9800 !important;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
    border-radius: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.case-view-section-fix-hint {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8e1;
    border: 1px solid #ffcc80;
    color: #e65100;
}

.case-view-advance-block-callout {
    margin: 14px 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.case-view-advance-block-msg {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #991b1b;
    line-height: 1.45;
}

.dashboard-ops-queue-list li:last-child {
    border-bottom: none !important;
}

.dashboard-ops-queue-chip--overdue {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
    font-weight: 600;
}

/* Planned equipment — ensure Add product is clickable above any stacking context */
.intake-planned-add-btn {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

/* Guided intake — planned equipment (multi-line blocks) */
.case-intake-planned-builder {
    margin-top: var(--space-sm);
}

.intake-planned-hint-below {
    margin: var(--space-md) 0 var(--space-sm);
    line-height: 1.45;
    max-width: 52rem;
}

.intake-planned-blocks-host {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.intake-planned-block {
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface, #fafbfc);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.intake-planned-block-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.intake-planned-block-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.intake-planned-block-grid {
    align-items: end;
    gap: var(--space-md) var(--space-lg);
}

@media (min-width: 720px) {
    .intake-planned-block-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .intake-planned-field--qty {
        max-width: 8rem;
    }
}

.intake-planned-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
}

.intake-planned-field .input-select,
.intake-planned-field .input-text {
    width: 100%;
}

.intake-pb-variant-wrap label {
    font-weight: 600;
}

/* Add case — patient search & guided layout */
.add-case-page .add-case-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.add-case-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.add-case-step--active {
    color: var(--text);
    font-weight: 700;
}

.add-case-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--bg-app);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
}

.add-case-step--active .add-case-step-num {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

.add-case-step-sep {
    color: var(--text-muted);
    user-select: none;
}

.add-case-card-main .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.add-case-label-main {
    font-size: 15px;
    font-weight: 700;
}

.add-case-hint {
    margin: 4px 0 var(--space-sm);
    font-size: 13px;
}

.add-case-field-group {
    margin-bottom: var(--space-md);
}

.add-case-field-group--spaced {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.patient-search-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.patient-search-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.patient-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.patient-search-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.patient-suggestions {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.patient-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.patient-suggestion-item:last-child {
    border-bottom: none;
}

.patient-suggestion-item:hover,
.patient-suggestion-item--active {
    background: #eff6ff;
}

.patient-suggestion-title {
    font-weight: 600;
}

.patient-suggestion-sub {
    font-size: 12px;
}

.patient-search-msg {
    margin: 8px 0 0;
    font-size: 13px;
}

.patient-selected {
    margin-top: var(--space-md);
    border: 1px solid #86efac;
    background: #f0fdf4;
}

.patient-selected-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding: var(--space-sm);
}

.add-case-filters {
    margin: var(--space-md) 0;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.add-case-filters summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.add-case-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.add-case-filters-grid label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.add-case-filters-grid .add-case-filter-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.add-case-assign-note {
    margin: var(--space-lg) 0 var(--space-md);
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
}

.add-case-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.add-case-guide-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.6;
}

.add-case-guide-list li {
    margin-bottom: var(--space-sm);
}

@media (max-width: 720px) {
    .add-case-page .grid-two.add-case-grid {
        grid-template-columns: 1fr;
    }
}

/* —— Simplified catalog (products list) —— */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.catalog-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: var(--space-md);
}

.catalog-category-tab {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-app, #fff);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.catalog-category-tab:hover {
    border-color: var(--primary, #2563eb);
    color: var(--primary, #2563eb);
}

.catalog-category-tab.is-active {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.catalog-simple-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-md);
}

.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
}

.catalog-product-card {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-app, #fff);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.catalog-product-card:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.catalog-product-card-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.catalog-product-card-meta {
    margin: 0 0 10px;
    font-size: 13px;
}

.catalog-product-card-foot {
    margin: 0 0 8px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.catalog-product-card-price {
    font-weight: 700;
    color: var(--text);
}

.catalog-product-card-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #2563eb);
}

/* Dashboard visual redesign: presentation only, scoped to dashboard page */
.dashboard-page {
    --dashboard-bg: linear-gradient(180deg, #f3f6fb 0%, #e8eef6 100%);
    --dashboard-card-border: rgba(100, 116, 139, 0.24);
    --dashboard-card-shadow: 0 14px 30px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(15, 23, 42, 0.04);
    --dashboard-soft-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.dashboard-page .main-area,
.dashboard-page .content-wrap {
    background: var(--dashboard-bg);
}

.dashboard-page .content-wrap {
    padding-top: 20px;
    padding-bottom: 30px;
}

.dashboard-page .page-header {
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.1), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.95));
    box-shadow: var(--dashboard-card-shadow);
}

.dashboard-page .page-header-inner {
    gap: 16px;
    align-items: center;
}

.dashboard-page .page-kicker {
    margin-bottom: 6px;
    color: #4338ca;
    letter-spacing: 0.12em;
}

.dashboard-page .page-heading {
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.dashboard-page .page-subtitle {
    margin-top: 8px;
    max-width: 68ch;
    font-size: 14px;
    line-height: 1.55;
    color: #526079;
}

.dashboard-page .page-toolbar {
    padding-top: 0;
}

.dashboard-page .dashboard-header-actions {
    gap: 12px;
}

.dashboard-page .dashboard-header-actions__group {
    gap: 10px;
}

.dashboard-page .dashboard-header-actions__group--primary {
    padding-left: 14px;
}

.dashboard-page .btn {
    border-radius: 999px;
    padding: 9px 15px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.dashboard-page .btn-sm {
    padding: 8px 13px;
}

.dashboard-page .btn-secondary {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(148, 163, 184, 0.24);
}

.dashboard-page .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    border-color: transparent;
}

.dashboard-page .page-body {
    gap: 18px;
}

.dashboard-page .dashboard-section {
    gap: 10px;
}

.dashboard-page .dashboard-section-heading {
    align-items: center;
}

.dashboard-page .dashboard-section-kicker {
    color: #4f46e5;
}

.dashboard-page .dashboard-section-title {
    font-size: 1.28rem;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.dashboard-page .dashboard-section-subtitle {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #5e6b81;
}

.dashboard-page .dashboard-summary-strip,
.dashboard-page .dashboard-operational-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.dashboard-page .dashboard-summary-card,
.dashboard-page .dashboard-workbench-stat,
.dashboard-page .dashboard-operational-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 156px;
    padding: 18px;
    border: 1px solid var(--dashboard-card-border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
    box-shadow: var(--dashboard-card-shadow);
    overflow: hidden;
}

.dashboard-page .dashboard-operational-card {
    min-height: 142px;
}

.dashboard-page .dashboard-summary-card::before,
.dashboard-page .dashboard-workbench-stat::before,
.dashboard-page .dashboard-operational-card::before,
.dashboard-page .dashboard-pipeline-stage::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
}

.dashboard-page .dashboard-summary-card--warning::before,
.dashboard-page .dashboard-workbench-stat--warning::before,
.dashboard-page .dashboard-operational-card--warning::before,
.dashboard-page .dashboard-pipeline-stage--warning::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.dashboard-page .dashboard-summary-card--alert::before,
.dashboard-page .dashboard-workbench-stat--alert::before,
.dashboard-page .dashboard-operational-card--alert::before,
.dashboard-page .dashboard-pipeline-stage--alert::before {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.dashboard-page .dashboard-summary-card--success::before,
.dashboard-page .dashboard-operational-card--success::before {
    background: linear-gradient(90deg, #10b981, #22c55e);
}

.dashboard-page .dashboard-summary-card--info::before,
.dashboard-page .dashboard-workbench-stat--info::before,
.dashboard-page .dashboard-pipeline-stage--info::before {
    background: linear-gradient(90deg, #2563eb, #4f46e5);
}

.dashboard-page .dashboard-metric-card__head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-page .dashboard-metric-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    flex: 1;
}

.dashboard-page .dashboard-metric-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.12), rgba(79, 70, 229, 0.06));
    color: #4338ca;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dashboard-page .dashboard-summary-card--warning .dashboard-metric-badge,
.dashboard-page .dashboard-workbench-stat--warning .dashboard-metric-badge,
.dashboard-page .dashboard-pipeline-stage--warning .dashboard-pipeline-step {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.dashboard-page .dashboard-summary-card--alert .dashboard-metric-badge,
.dashboard-page .dashboard-workbench-stat--alert .dashboard-metric-badge,
.dashboard-page .dashboard-operational-card--alert .dashboard-metric-badge,
.dashboard-page .dashboard-pipeline-stage--alert .dashboard-pipeline-step {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.dashboard-page .dashboard-summary-card--success .dashboard-metric-badge,
.dashboard-page .dashboard-operational-card--success .dashboard-metric-badge {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.dashboard-page .dashboard-summary-card--info .dashboard-metric-badge,
.dashboard-page .dashboard-workbench-stat--info .dashboard-metric-badge,
.dashboard-page .dashboard-pipeline-stage--info .dashboard-pipeline-step {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.dashboard-page .dashboard-metric-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.045);
    color: #5e6b81;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-page .dashboard-metric-card__value-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-page .dashboard-summary-label {
    margin: 0;
    font-size: 11px;
    color: #6b7a90;
    letter-spacing: 0.1em;
}

.dashboard-page .dashboard-summary-value {
    margin: 0;
    font-size: clamp(1.75rem, 2.3vw, 2.05rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.dashboard-page .dashboard-summary-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #526079;
}

.dashboard-page .dashboard-metric-linkhint {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: #3730a3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-page .dashboard-metric-card__glow {
    position: absolute;
    right: -24px;
    bottom: -24px;
    width: 108px;
    height: 108px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0));
    pointer-events: none;
}

.dashboard-page .dashboard-command-card,
.dashboard-page .dashboard-panel {
    border: 1px solid var(--dashboard-card-border);
    border-radius: 22px;
    box-shadow: var(--dashboard-card-shadow);
    background: rgba(255, 255, 255, 0.96);
    overflow: hidden;
}

.dashboard-page .dashboard-command-card .card-header,
.dashboard-page .dashboard-panel .card-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.14);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.92));
}

.dashboard-page .dashboard-command-card .card-pad,
.dashboard-page .dashboard-panel .card-pad {
    padding: 18px 20px 20px;
}

.dashboard-page .card-title {
    font-size: 0.98rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dashboard-page .card-header .muted {
    line-height: 1.45;
    color: #5e6b81;
}

.dashboard-page .dashboard-pipeline {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 12px;
}

.dashboard-page .dashboard-pipeline::before {
    left: 38px;
    right: 38px;
    top: 38px;
    height: 2px;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.12), rgba(79, 70, 229, 0.34), rgba(79, 70, 229, 0.12));
}

.dashboard-page .dashboard-pipeline-stage {
    min-height: 178px;
    padding: 16px;
    border: 1px solid var(--dashboard-card-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: var(--dashboard-soft-shadow);
    overflow: visible;
}

.dashboard-page .dashboard-pipeline-stage__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-page .dashboard-pipeline-stage::after {
    content: "";
    position: absolute;
    top: 37px;
    right: -12px;
    width: 16px;
    height: 2px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.34), rgba(99, 102, 241, 0));
    pointer-events: none;
}

.dashboard-page .dashboard-pipeline-stage:last-child::after {
    display: none;
}

.dashboard-page .dashboard-pipeline-step {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    font-size: 13px;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-page .dashboard-pipeline-stage__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7a90;
}

.dashboard-page .dashboard-pipeline-title {
    font-size: 1rem;
    line-height: 1.3;
    color: #0f172a;
}

.dashboard-page .dashboard-pipeline-value {
    font-size: clamp(1.9rem, 2.4vw, 2.2rem);
    line-height: 0.95;
    color: #020617;
}

.dashboard-page .dashboard-inline-meter {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.dashboard-page .dashboard-inline-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
}

.dashboard-page .dashboard-pipeline-stage--warning .dashboard-inline-meter span {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.dashboard-page .dashboard-pipeline-stage--alert .dashboard-inline-meter span {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.dashboard-page .dashboard-pipeline-stage--info .dashboard-inline-meter span {
    background: linear-gradient(90deg, #2563eb, #4f46e5);
}

.dashboard-page .dashboard-pipeline-buckets {
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(100, 116, 139, 0.14);
}

.dashboard-page .dashboard-pipeline-bucket {
    padding: 14px;
    border: 1px solid rgba(100, 116, 139, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
}

.dashboard-page .dashboard-workbench-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 16px;
}

.dashboard-page .dashboard-workbench-column {
    gap: 16px;
}

.dashboard-page .dashboard-workbench-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-page .dashboard-action-groups {
    gap: 10px;
}

.dashboard-page .dashboard-action-group {
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid rgba(100, 116, 139, 0.12);
    border-radius: 0;
    background: transparent;
}

.dashboard-page .dashboard-action-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.dashboard-page .dashboard-action-group__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.dashboard-page .dashboard-action-group__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7a90;
}

.dashboard-page .dashboard-action-group__header h4 {
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}

.dashboard-page .dashboard-action-group__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.06));
    color: #4338ca;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-page .dashboard-action-group__grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.dashboard-page .dashboard-action-card {
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border-color: rgba(100, 116, 139, 0.14);
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.92), rgba(255, 255, 255, 0.98));
    box-shadow: none;
}

.dashboard-page .dashboard-action-badge {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.dashboard-page .dashboard-list,
.dashboard-page .dashboard-notification-list {
    gap: 10px;
}

.dashboard-page .dashboard-list-item,
.dashboard-page .dashboard-notification-item {
    padding: 12px 14px;
    border-radius: 14px;
    border-color: rgba(100, 116, 139, 0.14);
    background: linear-gradient(180deg, rgba(249, 251, 253, 0.94), rgba(255, 255, 255, 0.98));
}

.dashboard-page .dashboard-list-item--compact {
    padding: 10px 12px;
}

.dashboard-page .dashboard-notification-item {
    align-items: flex-start;
}

.dashboard-page .dashboard-notification-marker {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08);
}

.dashboard-page .dashboard-notification-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.dashboard-page .dashboard-notification-state {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-page .dashboard-notification-link {
    font-weight: 600;
    color: #0f172a;
}

.dashboard-page .dashboard-notification-meta {
    margin: 0;
    font-size: 12px;
    color: #6b7a90;
}

.dashboard-page .dashboard-list-item--alert-row {
    align-items: flex-start;
}

.dashboard-page .dashboard-alert-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.dashboard-page .dashboard-alert-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.dashboard-page .dashboard-alert-title-row strong {
    font-size: 13px;
    color: #0f172a;
}

.dashboard-page .dashboard-alert-severity-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
}

.dashboard-page .dashboard-alert-severity-badge--high {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.dashboard-page .dashboard-alert-severity-badge--medium {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.dashboard-page .dashboard-alert-severity-badge--normal {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

.dashboard-page .dashboard-alert-text {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    color: #526079;
}

.dashboard-page .dashboard-list-item--alert-row .chip {
    align-self: flex-start;
}

.dashboard-page .dashboard-list-item--severity-high {
    border-color: rgba(239, 68, 68, 0.18);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.86), rgba(255, 255, 255, 0.98));
}

.dashboard-page .dashboard-list-item--severity-medium {
    border-color: rgba(245, 158, 11, 0.18);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.86), rgba(255, 255, 255, 0.98));
}

.dashboard-page .chip-neutral {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
}

.dashboard-page .dashboard-list-count {
    min-width: 36px;
    border-radius: 999px;
}

.dashboard-page .message {
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1260px) {
    .dashboard-page .dashboard-pipeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-page .dashboard-pipeline-buckets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-page .dashboard-pipeline-stage::after {
        display: none;
    }
}

@media (max-width: 980px) {
    .dashboard-page .page-header {
        padding: 18px;
        border-radius: 20px;
    }

    .dashboard-page .dashboard-workbench-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-page .content-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-page .page-heading {
        font-size: 2rem;
    }

    .dashboard-page .dashboard-summary-strip,
    .dashboard-page .dashboard-operational-grid,
    .dashboard-page .dashboard-workbench-stats,
    .dashboard-page .dashboard-pipeline,
    .dashboard-page .dashboard-pipeline-buckets,
    .dashboard-page .dashboard-action-group__grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page .dashboard-summary-card,
    .dashboard-page .dashboard-workbench-stat,
    .dashboard-page .dashboard-operational-card,
    .dashboard-page .dashboard-pipeline-stage {
        min-height: 0;
    }
}
