/* "Clarity" design system — applied app-wide on top of Bootstrap + MudBlazor defaults. */

:root {
    --clarity-primary: #4B57D6;
    --clarity-primary-hover: #3742B8;
    --clarity-primary-bg: #ECEEFC;
    --clarity-primary-text: #3742B8;
    --clarity-success: #188A5B;
    --clarity-bg: #F7F9FC;
    --clarity-surface: #FFFFFF;
    --clarity-border: #E6EBF2;
    --clarity-border-soft: #EEF1F6;
    --clarity-text: #16202E;
    --clarity-text-secondary: #6B7686;
    --clarity-text-muted: #16202E;
    --clarity-text-faint: #A3ABB8;

    --bs-primary: var(--clarity-primary);
    --bs-primary-rgb: 75, 87, 214;
    --bs-link-color: var(--clarity-primary);
    --bs-link-color-rgb: 75, 87, 214;
    --bs-link-hover-color: var(--clarity-primary-hover);
}

html, body {
    font-family: 'Plus Jakarta Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--clarity-bg);
    color: var(--clarity-text);
}

a, .btn-link {
    color: var(--clarity-primary);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--clarity-text);
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Top navigation is styled via AppShell classes in NavMenu.razor.css */

/* Cards */
.card {
    background: var(--clarity-surface);
    border: 1px solid var(--clarity-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
}

.card-header {
    background: var(--clarity-surface) !important;
    border-bottom: 1px solid var(--clarity-border-soft);
    border-radius: 14px 14px 0 0 !important;
}

.card-header h5, .card-header .h5 {
    font-size: 15px;
    font-weight: 700;
}

/* Tables */
.table {
    color: var(--clarity-text);
    --bs-table-bg: transparent;
}

.table > thead {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-faint);
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--clarity-border-soft);
    padding: 10px 12px;
}

.quickgrid th {
    background-color: var(--clarity-bg);
    color: var(--clarity-text-faint);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-color: var(--clarity-border-soft) !important;
}

.quickgrid td {
    border-color: var(--clarity-border-soft) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.btn-dark, .btn-dark:hover, .btn-dark:focus {
    background-color: var(--clarity-primary) !important;
    border-color: var(--clarity-primary) !important;
    color: #fff !important;
}

.btn-dark:hover {
    background-color: var(--clarity-primary-hover) !important;
    border-color: var(--clarity-primary-hover) !important;
}

.btn-outline-dark {
    color: var(--clarity-primary) !important;
    border-color: var(--clarity-border) !important;
}

.btn-outline-dark:hover {
    background-color: var(--clarity-primary-bg) !important;
    color: var(--clarity-primary-text) !important;
    border-color: var(--clarity-border) !important;
}

/* Forms */
.form-control, .form-select {
    border: 1px solid var(--clarity-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--clarity-text);
}

.form-control:focus, .form-select:focus {
    border-color: var(--clarity-primary);
    box-shadow: 0 0 0 0.2rem var(--clarity-primary-bg);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 30px 70px -20px rgba(20,32,46,0.35);
}

.modal-header {
    border-bottom: none;
    padding: 28px 32px 0;
}

.modal-title {
    font-weight: 800;
    font-size: 19px;
    color: var(--clarity-text);
}

.modal-body {
    padding: 22px 32px 28px;
}

.modal-body:has(+ .modal-footer) {
    padding-bottom: 22px;
}

.modal-body .form-control, .modal-body .form-select {
    background: var(--clarity-bg);
}

.modal-footer {
    padding: 16px 32px 28px;
    border-top: none;
}

/* Uppercase micro-labels used throughout forms/modals */
.form-group > label, .modal-body > label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-muted);
    display: block;
    margin-bottom: 6px;
}

/* Progress bars (Bootstrap .progress, e.g. file upload progress) */
.progress {
    border-radius: 8px;
    background-color: var(--clarity-primary-bg);
    height: 28px;
}

.progress-bar {
    background-color: var(--clarity-primary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

/* Misc */
.page-padding {
    background: var(--clarity-bg);
}

/* Status pills (data list pattern) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
}

.status-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill .label {
    font-size: 12px;
    font-weight: 700;
}

.status-pill--imported { background: #ECEEFC; }
.status-pill--imported .dot { background: #4B57D6; }
.status-pill--imported .label { color: #3742B8; }

.status-pill--approved { background: #E6F4EC; }
.status-pill--approved .dot { background: #188A5B; }
.status-pill--approved .label { color: #146945; }

.status-pill--editing { background: #FBF0DE; }
.status-pill--editing .dot { background: #D6A24B; }
.status-pill--editing .label { color: #93691F; }

.status-pill--disabled { background: #EEF1F6; }
.status-pill--disabled .dot { background: #A3ABB8; }
.status-pill--disabled .label { color: #6B7686; }

.status-pill--hold { background: #FBEAEA; }
.status-pill--hold .dot { background: #C0362C; }
.status-pill--hold .label { color: #9A241C; }

.status-pill--review { background: #F1E9FB; }
.status-pill--review .dot { background: #7C4DBE; }
.status-pill--review .label { color: #5A3491; }

.action-btn-primary {
    display: inline-block;
    background: var(--clarity-primary);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
    border: none;
}

.action-btn-primary:hover {
    background: var(--clarity-primary-hover);
    color: #fff !important;
}

.action-btn-primary--disabled, .action-btn-primary:disabled {
    background: var(--clarity-border-soft) !important;
    color: var(--clarity-text-secondary) !important;
    border: 1px solid var(--clarity-border);
    cursor: not-allowed;
}

.action-btn-danger {
    display: inline-block;
    border: 1px solid #E7A0A0;
    color: #C24444 !important;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
    background: transparent;
}

.action-btn-danger:hover {
    background: #FBEAEA;
    color: #C24444 !important;
}

.action-btn-outline {
    display: inline-block;
    border: 1px solid var(--clarity-border);
    color: #3C4656;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: 8px;
    background: #fff;
}

.action-btn-outline:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.back-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-primary);
    margin-bottom: 16px;
}

/* Shared panel (order-card equivalent, usable outside the Order View scope) */
.panel {
    background: var(--clarity-surface);
    border: 1px solid var(--clarity-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
    padding: 22px;
}

.panel--main {
    padding: 28px 30px;
}

.panel--fit {
    height: fit-content;
}

.panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--clarity-text);
    margin-bottom: 16px;
}

.panel-title--lg {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clarity-text-muted);
}

.field-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-muted);
    margin-bottom: 6px;
    display: block;
}

.builder-grid {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 28px;
}

@media (max-width: 1199px) {
    .builder-grid {
        grid-template-columns: 1fr;
    }
}

.dropzone {
    border: 2px dashed #C7CFE0;
    border-radius: 14px;
    background: #fff;
    padding: 36px;
    text-align: center;
}

.dropzone input[type="file"] {
    margin-top: 12px;
}

.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.icon-btn--edit {
    background: var(--clarity-primary-bg);
    color: var(--clarity-primary);
}

.icon-btn--danger {
    background: #FBEAEA;
    color: #C24444;
}

.thumb-120 {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    background: #F0F1F4;
    object-fit: contain;
    flex: none;
}

.thumb-52 {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #F0F1F4;
    object-fit: contain;
    flex: none;
}

.log-row {
    padding: 14px 20px;
    border-top: 1px solid var(--clarity-border-soft);
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.log-date {
    font-size: 12px;
    color: var(--clarity-text-muted);
    white-space: nowrap;
    width: 150px;
    flex: none;
}

.log-message {
    font-size: 13px;
    color: #3C4656;
    line-height: 1.6;
}

/* Standalone edit-form pages (Edit Products, Edit Sizes, etc.) */
.edit-form {
    width: 400px;
}

.edit-form-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #3C4656;
    margin-bottom: 6px;
    display: block;
}

.edit-form-field-input {
    border: 1px solid var(--clarity-border);
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 14px;
    color: #3C4656;
    background: #fff;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
    width: 100%;
}

.edit-form-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--clarity-primary);
}

/* Modal dialog field-stack (Edit User, Edit Company) */
.modal-field-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-muted);
    margin-bottom: 6px;
    display: block;
}

/* Review Order (3c) */
.review-order-card {
    background: #fff;
    border: 1px solid var(--clarity-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
    overflow: hidden;
}

.review-order-subtitle {
    font-size: 14px;
    color: var(--clarity-text-secondary);
    margin-top: 2px;
}

.review-item-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--clarity-border);
    border-radius: 10px;
    padding: 7px 10px;
}

.review-stepper-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #F1F4F8;
    color: var(--clarity-text-secondary);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.review-stepper-btn--next {
    background: var(--clarity-primary-bg);
    color: var(--clarity-primary);
}

.review-stepper-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.review-stepper-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-text);
    white-space: nowrap;
}

.review-meta-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 18px;
    border-bottom: 1px solid var(--clarity-border-soft);
}

.review-meta-filename {
    font-size: 14px;
    font-weight: 700;
    color: var(--clarity-text);
}

.review-meta-info {
    font-size: 13px;
    color: var(--clarity-text-secondary);
}

.review-version-select {
    border: 1px solid var(--clarity-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #3C4656;
    background: #fff;
}

.review-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr 340px;
    gap: 0;
    align-items: stretch;
}

.review-pane {
    padding: 14px 18px;
    border-right: 1px solid var(--clarity-border-soft);
}

.review-pane-label-row {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 22px;
    margin-bottom: 10px;
}

.review-pane-image {
    width: 100%;
    aspect-ratio: 14 / 11;
    border-radius: 10px;
    object-fit: cover;
    background: #F0F1F4;
    border: 1px solid var(--clarity-border);
}

.review-decision-col {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    background: var(--clarity-bg);
}

.review-decision-label-row {
    display: flex;
    align-items: center;
    height: 22px;
    margin-bottom: 10px;
}

.review-reject-label {
    font-size: 13px;
    font-weight: 600;
    color: #3C4656;
}

.review-reject-label span {
    color: var(--clarity-text-muted);
    font-weight: 400;
}

.review-reject-textarea {
    flex: 1 1 0;
    min-height: 100px;
    box-sizing: border-box;
    resize: vertical;
}

/* Shares the leftover column height equally with the Reject notes box, so the box takes half of
   what it used to fill (it was flex:1 alone) while the decision buttons stay pinned to the bottom. */
.review-decision-spacer {
    flex: 1 1 0;
    min-height: 0;
}

.review-notes-block {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--clarity-border);
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.review-notes-block--rejected {
    border-color: #E8B4B0;
}

.review-notes-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-muted);
    margin-bottom: 6px;
}

.review-notes-text {
    font-size: 13px;
    color: #3C4656;
    line-height: 1.4;
}

.review-notes-text + .review-notes-text {
    margin-top: 6px;
}

.review-notes-meta {
    font-weight: 600;
    color: var(--clarity-text-secondary);
}

.review-notes-effects {
    margin-top: 6px;
    font-size: 12px;
    color: var(--clarity-text-secondary);
}

.review-decision-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.review-decision-actions button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.review-confirm-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.review-confirm-count-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.review-confirm-count-pill--approved {
    background: #E6F4EC;
    color: #146945;
}

.review-confirm-count-pill--approved .dot {
    background: #188A5B;
}

.review-confirm-count-pill--rejected {
    background: #FBEAEA;
    color: #A83333;
}

.review-confirm-count-pill--rejected .dot {
    background: #C24444;
}

.review-confirm-table {
    background: #fff;
    border: 1px solid var(--clarity-border-soft);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
    overflow: hidden;
}

.review-confirm-row {
    display: grid;
    grid-template-columns: 72px 1.3fr 1.1fr 150px 1.6fr 90px;
    gap: 0 16px;
    padding: 14px 20px;
    align-items: center;
}

.review-confirm-row--head {
    background: var(--clarity-bg);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8B95A6;
    padding: 13px 20px;
}

.review-confirm-row--body {
    border-top: 1px solid var(--clarity-border-soft);
}

.review-confirm-thumb {
    width: 56px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #F0F1F4;
    border: 1px solid var(--clarity-border-soft);
}

.review-confirm-filename {
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-text);
}

.review-confirm-product {
    font-size: 13px;
    color: var(--clarity-text-secondary);
}

.review-confirm-notes {
    font-size: 13px;
    color: var(--clarity-text-secondary);
}

.review-confirm-reopen {
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-primary);
    text-align: right;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.review-confirm-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--clarity-border-soft);
    background: var(--clarity-bg);
}

.review-confirm-footer-note {
    font-size: 13px;
    color: var(--clarity-text-secondary);
}

.review-confirm-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-confirm-save-later {
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.amount-credit {
    color: var(--clarity-success);
}

.amount-danger {
    color: #C24444;
}

.image-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-lightbox-img {
    max-width: 96vw;
    max-height: 96vh;
    object-fit: contain;
    cursor: zoom-in;
}

.image-lightbox-img--zoomed {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
}

.image-lightbox-close {
    position: fixed;
    top: 16px;
    right: 24px;
    font-size: 32px;
    line-height: 1;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
}

/* Order History modal (2l) — wider variant */
.modal-dialog.modal-lg {
    max-width: 780px;
}

/* Shared page shell for list/dashboard pages */
.page-shell {
    padding: 32px 40px 44px;
}

.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 23px;
    font-weight: 800;
    color: var(--clarity-text);
    letter-spacing: -0.01em;
    margin: 0;
}

.page-title .accent {
    color: var(--clarity-primary);
}

.list-card {
    background: var(--clarity-surface);
    border: 1px solid var(--clarity-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
    overflow: hidden;
}

.list-card-headrow {
    display: grid;
    gap: 0 12px;
    padding: 14px 24px;
    background: var(--clarity-bg);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-muted);
}

.list-card-row {
    display: grid;
    gap: 0 12px;
    padding: 3px 24px;
    border-top: 1px solid var(--clarity-border-soft);
    align-items: center;
}

.list-card-row:hover {
    background: #FAFBFD;
}

.list-cell-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-primary);
}

.list-cell {
    font-size: 14px;
    color: #3C4656;
}

.list-cell-muted {
    font-size: 13px;
    color: var(--clarity-text-secondary);
}

.list-cell-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--clarity-text);
    text-align: right;
}

.list-cell-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.list-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-top: 1px solid var(--clarity-border-soft);
    font-size: 13px;
    color: var(--clarity-text-secondary);
}

.page-nav-btn {
    border: 1px solid var(--clarity-border);
    background: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--clarity-text-secondary);
    padding: 4px 10px;
    margin: 0 6px;
}

.page-nav-btn:disabled {
    opacity: 0.4;
}

.list-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.list-filters .input-group-text {
    background: var(--clarity-bg);
    border: 1px solid var(--clarity-border);
    color: var(--clarity-text-secondary);
    font-size: 13px;
    font-weight: 600;
}

/* Dashboard stage pipeline (3d) */
.dashboard-stage-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.dashboard-stage-tile {
    background: var(--clarity-surface);
    border: 1px solid var(--clarity-border);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(20, 32, 46, 0.04);
}

.dashboard-stage-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--clarity-text-faint);
    white-space: nowrap;
}

.dashboard-stage-count {
    font-size: 30px;
    font-weight: 800;
    color: var(--clarity-text);
    line-height: 1;
    margin-top: 8px;
}

.dashboard-stage-bar-track {
    height: 4px;
    border-radius: 2px;
    background: var(--clarity-border-soft);
    margin-top: 14px;
    overflow: hidden;
}

.dashboard-stage-bar-fill {
    height: 4px;
    border-radius: 2px;
}

.dashboard-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 190px;
    padding: 20px 22px 18px;
}

.dashboard-chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.dashboard-chart-bar-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--clarity-text);
}

.dashboard-chart-bar-track {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.dashboard-chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
}

.dashboard-chart-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--clarity-text-secondary);
    white-space: nowrap;
}

.email-help {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--clarity-text-secondary);
}

/* The lab settings pages are full of boxes that may be filled in or left empty. A value that has been
   set shows in solid black and the hint in an empty box is lighter and italic, so the two can't be
   mistaken for each other. */
.lab-settings .edit-form-field-input {
    color: #000;
}

.lab-settings .edit-form-field-input::placeholder {
    color: #9AA3B0;
    font-style: italic;
    opacity: 1;
}

.lab-settings .edit-form-field-input:disabled {
    background: #F3F5F8;
    color: #7A8494;
}
