html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --crm-primary: #185abd;
    --crm-primary-dark: #134a9b;
    --crm-accent: #138a72;
    --crm-surface: #f3f5f7;
    --crm-surface-raised: #fff;
    --crm-surface-sunken: #e9eff3;
    --crm-text: #17212b;
    --crm-muted: #657585;
    --crm-border: #d7e0e7;
    --crm-success: #198754;
    --crm-warning: #9a6414;
    --crm-danger: #c43d4b;
    --crm-radius: 6px;
    --crm-sidebar: #23272c;
    --crm-sidebar-text: #e0e5ea;
    --crm-sidebar-muted: #aeb8c2;
    --crm-shadow: 0 1px 2px rgb(15 23 42 / 6%);
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    color: var(--crm-text);
    background: var(--crm-surface);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--crm-surface); }
body { color: var(--crm-text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--crm-primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

.crm-app { min-height: 100vh; display: flex; flex-direction: column; }
.crm-header { height: 56px; flex: 0 0 56px; display: flex; align-items: center; gap: 24px; padding: 0 18px; background: var(--crm-surface-raised); border-bottom: 1px solid var(--crm-border); box-shadow: 0 1px 4px rgb(15 23 42 / 8%); z-index: 4; }
.crm-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 207px; color: var(--crm-text); font-weight: 750; font-size: 15px; }
.crm-brand__mark { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; }
.crm-header__context { display: flex; align-items: center; gap: 9px; color: var(--crm-muted); font-size: 12px; }
.crm-live-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--crm-accent); box-shadow: 0 0 0 3px rgb(19 138 114 / 12%); }
.crm-header__divider { height: 14px; width: 1px; margin: 0 4px; background: var(--crm-border); }
.crm-user { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; color: var(--crm-text); font-size: 12px; font-weight: 650; }
.crm-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--crm-primary); background: #e3eef3; font-size: 11px; font-weight: 750; }
.crm-login-link { margin-left: auto; font-size: 12px; font-weight: 700; }
.crm-frame { min-height: 0; flex: 1; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.crm-sidebar { position: sticky; top: 0; height: calc(100dvh - 56px); display: flex; flex-direction: column; overflow-y: auto; padding: 14px 10px 12px; background: #343a40; border-right: 1px solid #2c3034; }
.crm-sidebar__group-label { padding: 8px 12px 7px; color: #adb5bd; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.crm-sidebar__group-label--spaced { margin-top: 16px; }
.crm-nav { display: flex; flex-direction: column; gap: 2px; }
.crm-nav__link { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: 4px; color: #c2c7d0; background: transparent; text-align: left; font-size: 13px; font-weight: 600; transition: background-color .12s ease, color .12s ease; }
.crm-nav__link:hover { color: #fff; background: #495057; }
.crm-nav__link.active { color: #fff; background: #0d6efd; box-shadow: inset 3px 0 0 #75b3ff; font-weight: 700; }
.crm-nav__link:focus-visible { outline: 2px solid #a6d4ff; outline-offset: -2px; }
.crm-nav__icon { width: 18px; flex: 0 0 18px; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-size: 16px; line-height: 1; color: #adb5bd; }
.crm-nav__link.active .crm-nav__icon { color: #fff; }
.crm-nav__link.active .crm-nav__icon { color: inherit; }
.crm-nav__count { min-width: 19px; margin-left: auto; padding: 1px 5px; border-radius: 9px; background: #dfe7ec; color: #526371; font-size: 10px; text-align: center; }
.crm-nav__count--alert { color: #76500f; background: #f4e8cc; }
.crm-sidebar__bottom { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid #434b54; }
.crm-sidebar__note { display: flex; align-items: center; gap: 9px; padding: 9px 10px; color: var(--crm-sidebar-muted); font-size: 11px; }
.crm-sidebar__auth { margin: 0; }
.crm-nav__link--utility { width: 100%; cursor: pointer; }
.crm-main { min-width: 0; display: flex; flex-direction: column; }
.crm-content { width: 100%; max-width: 1600px; flex: 1; display: flex; flex-direction: column; gap: 22px; margin: 0 auto; padding: 26px 30px 32px; }
.crm-footer { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 30px; border-top: 1px solid var(--crm-border); color: var(--crm-muted); font-size: 10px; }

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 720; }
.eyebrow { margin: 0 0 5px; color: var(--crm-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.page-subtitle { margin: 6px 0 0; color: var(--crm-muted); font-size: 13px; }
.btn-crm { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; border: 1px solid transparent; border-radius: var(--bs-border-radius); cursor: pointer; font-size: 13px; font-weight: 600; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
:is(.btn-crm, .table-action, .icon-button):disabled { cursor: not-allowed; opacity: .58; }
:is(.btn-crm, .table-action, .icon-button):focus-visible { outline: 2px solid var(--crm-primary); outline-offset: 2px; }
.btn-crm--primary { color: #fff; background: var(--crm-primary); border-color: var(--crm-primary); }
.btn-crm--primary:hover:not(:disabled) { background: var(--crm-primary-dark); border-color: var(--crm-primary-dark); }
.btn-crm--quiet { color: #344756; background: var(--crm-surface-raised); border-color: var(--crm-border); }
.btn-crm--quiet:hover:not(:disabled) { color: var(--crm-primary-dark); border-color: #a9bfdc; background: #eef4fc; }
.btn-crm--danger { color: #fff; background: #b52b3a; border-color: #b52b3a; }
.btn-crm--danger:hover:not(:disabled) { color: #fff; background: #942230; border-color: #942230; }
.table-action--danger { --action-ink: #a32636; --action-hover: #fcecef; }
:is(.action-add, .action-edit, .action-delete, .action-save, .action-search, .action-send)::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; background: currentColor; mask: var(--action-icon) center / contain no-repeat; }
.action-add { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E"); }
.action-edit { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.878l-1.321 4.528a.5.5 0 0 0 .62.62l4.528-1.32a2 2 0 0 0 .878-.502zM15 5l4 4'/%3E%3C/svg%3E"); }
.action-delete { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M19 6v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6m3 0V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m-6 4v7m4-7v7'/%3E%3C/svg%3E"); }
.action-save { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h13l4 4v13a1 1 0 0 1-1 1zM7 3v6h8V3M7 21v-8h10v8'/%3E%3C/svg%3E"); }
.action-search { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.action-send { --action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4 20-7ZM22 2 11 13'/%3E%3C/svg%3E"); }
.text-action { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--crm-primary); background: none; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.icon-button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: white; cursor: pointer; font-size: 19px; line-height: 1; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { min-width: 0; min-height: 116px; display: flex; flex-direction: column; gap: 8px; padding: 14px 15px; border: 1px solid var(--crm-border); border-left: 3px solid var(--crm-primary); border-radius: var(--crm-radius); background: var(--crm-surface-raised); box-shadow: var(--crm-shadow); }
.metric-card--danger { border-left-color: var(--crm-danger); }
.metric-card--warning { border-left-color: #c18a2e; }
.metric-card__top, .metric-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-card__top { color: var(--crm-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; }
.metric-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 3px; background: #edf3f6; color: var(--crm-primary); font-size: 14px; }
.metric-card__value { font-size: 24px; line-height: 1; font-weight: 740; font-variant-numeric: tabular-nums; }
.metric-card__bottom { margin-top: auto; color: var(--crm-muted); font-size: 10px; }
.dashboard-metrics .metric-card { --metric-ink: #fff; background: var(--metric-fill); color: var(--metric-ink); border: 0; }
.metric-card--sales { --metric-fill: #185abd; }
.metric-card--fulfilment { --metric-fill: #146c5a; }
.metric-card--stock { --metric-fill: #f2c46d; }
.dashboard-metrics .metric-card--stock { --metric-ink: #35250e; }
.metric-card--accounts { --metric-fill: #963b51; }
.dashboard-metrics :is(.metric-card__top, .metric-card__bottom) { color: inherit; font-size: 12px; letter-spacing: 0; }
.dashboard-metrics .metric-icon { color: inherit; background: rgb(0 0 0 / 13%); flex: 0 0 23px; }
.dashboard-metrics .metric-card__value { font-size: 30px; }
.content-section { min-width: 0; }
.section-heading { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.section-heading h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 730; }
.section-heading p { margin: 4px 0 0; color: var(--crm-muted); font-size: 10px; }
.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; }
.compact-section { min-width: 0; }
.table-shell { width: 100%; overflow: auto; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: var(--crm-surface-raised); box-shadow: var(--crm-shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { min-width: 80px; padding: 10px 12px; border-bottom: 1px solid #e6ecef; text-align: left; vertical-align: middle; }
.data-table th { color: #485664; background: #edf1f5; font-size: 11px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfd; }
.data-table strong { font-weight: 700; }
.table-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.product-list-cell { min-width: 190px; display: flex; align-items: center; gap: 10px; }
.product-list-thumbnail, .product-list-thumbnail-placeholder { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: #f5f9fa; }
.product-list-thumbnail { display: block; object-fit: cover; }
.product-list-thumbnail-placeholder { display: grid; place-items: center; color: var(--crm-muted); font-size: 19px; }
.cell-subtext { display: block; margin-top: 3px; color: var(--crm-muted); font-size: 10px; font-weight: 400; }
.order-audit-cell { min-width: 150px; font-size: 10px; line-height: 1.35; }
.order-audit-cell strong { display: block; margin-top: 5px; font-size: 9px; text-transform: uppercase; color: var(--crm-muted); }
.order-audit-cell strong:first-child { margin-top: 0; }
.table-link { color: var(--crm-primary); }
.table-action { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; margin-block: 2px; padding: 3px 8px; border: 1px solid var(--crm-border); border-radius: var(--bs-border-radius); color: var(--action-ink, var(--crm-primary)); background: var(--crm-surface-raised); cursor: pointer; font-size: 12px; font-weight: 600; }
.table-action:hover:not(:disabled) { color: var(--action-ink, var(--crm-primary-dark)); background: var(--action-hover, #eef4fc); border-color: currentColor; }
.status-pill { width: fit-content; min-height: 20px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 3px; color: var(--crm-primary); background: #e7f0f4; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-pill::before { width: 5px; height: 5px; display: inline-block; flex: 0 0 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-pill--success { color: #17734a; background: #e3f2ea; }
.status-pill--warning { color: #80540f; background: #f6edda; }
.status-pill--danger { color: #a32d3b; background: #f7e6e8; }
.status-pill--neutral { color: #586775; background: #edf1f3; }
.attention-row, .integration-row { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 1px; border-bottom: 1px solid #e1e8ec; font-size: 11px; }
.attention-row:last-child, .integration-row:last-child { border-bottom: 0; }
.quantity-alert { color: #8a5b11; font-weight: 750; white-space: nowrap; }
.quantity-alert small { color: var(--crm-muted); font-size: 9px; font-weight: 500; }
.integration-row > div { min-width: 0; flex: 1; }
.integration-mark { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border: 1px solid var(--crm-border); border-radius: 4px; color: var(--crm-primary); background: white; font-size: 12px; font-weight: 750; }
.integration-mark--green { color: var(--crm-accent); }

.toolbar-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 1px; border-bottom: 1px solid var(--crm-border); }
.toolbar-row--catalog { border: 0; }
.filter-tabs { display: flex; align-items: stretch; gap: 3px; overflow-x: auto; scrollbar-width: thin; }
.filter-tab { min-height: 37px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 0; border-bottom: 2px solid transparent; color: var(--crm-muted); background: transparent; cursor: pointer; font-size: 11px; white-space: nowrap; }
.filter-tab:hover { color: var(--crm-primary); }
.filter-tab.is-active { border-bottom-color: var(--crm-primary); color: var(--crm-primary); font-weight: 750; }
.filter-tab > span { min-width: 17px; padding: 1px 5px; border-radius: 9px; background: #e8edf0; color: #526371; font-size: 9px; text-align: center; }
.filter-tab > .tab-alert { color: #80540f; background: #f6edda; }
.filter-tab > .tab-success { color: #17734a; background: #e3f2ea; }
.search-field { width: min(320px, 42vw); min-height: 33px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: white; color: var(--crm-muted); }
.search-field > span { font-size: 18px; line-height: 1; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--crm-text); background: transparent; font-size: 11px; }
.search-field:focus-within { border-color: #7395a8; box-shadow: 0 0 0 2px rgb(36 91 120 / 12%); }
.search-field--compact { width: min(250px, 45%); }
.filter-tabs + .search-field { margin-bottom: 2px; }

.form-panel { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: #fff; box-shadow: var(--crm-shadow); }
.order-composer, .invite-panel, .product-form { animation: panel-in 150ms ease-out; }
.form-grid { display: grid; gap: 12px; }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: #334655; font-size: 10px; font-weight: 700; }
.field input, .field select, .field textarea, .field input[type=file] { width: 100%; min-height: 33px; padding: 7px 9px; border: 1px solid #cbd6dd; border-radius: var(--crm-radius); outline: 0; color: var(--crm-text); background: #fbfcfd; font-size: 11px; font-weight: 400; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7395a8; box-shadow: 0 0 0 2px rgb(36 91 120 / 12%); }
.field small { color: var(--crm-muted); font-size: 9px; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.catalog-search { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
.catalog-search .search-field { flex: 1 1 180px; }
.order-totals { margin-inline-start: auto; display: grid; grid-template-columns: auto auto; gap: 6px 20px; width: fit-content; }
.order-totals dd { text-align: right; margin: 0; }
.inline-confirmation { margin: 0; padding: 9px 11px; border: 1px solid #c7e4d4; border-radius: var(--crm-radius); color: #176f48; background: #eef8f2; font-size: 11px; }
.form-section { padding-top: 3px; }
.order-composer .section-heading, .product-form .section-heading, .invite-panel .section-heading { margin-bottom: 0; }
.product-form { padding-bottom: 14px; }
.product-photos { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 12px 0 0; }
.product-photos img { display: block; width: 120px; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); }
.photo-picker { min-width: 0; display: grid; gap: 10px; }
.photo-picker h3 { margin: 0; font-size: 15px; }
.photo-drop-zone { border: 1px dashed #829aa8; border-radius: var(--crm-radius); background: #f5f9fa; color: var(--crm-text); }
.photo-drop-zone.is-dragging, .photo-drop-zone:focus-within { border-color: #245b78; outline: 2px solid #245b78; outline-offset: 2px; background: #edf6f7; }
.photo-drop-label { position: relative; display: grid; justify-items: center; gap: 5px; padding: 18px 12px; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.photo-drop-label input { position: absolute; width: 100%; height: 100%; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop-label:has(input:disabled) { opacity: .65; cursor: default; }
.photo-drop-label:has(input:disabled) input { cursor: default; }
.photo-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 120px)); margin: 0; }
.photo-picker-list li { position: relative; min-width: 0; display: grid; gap: 4px; }
.photo-picker-list img { width: 100%; object-fit: cover; background: #f5f9fa; }
.photo-picker-list li > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.photo-picker-list .icon-button { position: absolute; top: 4px; right: 4px; }

.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 24px; border: 1px dashed #c8d4dc; border-radius: var(--crm-radius); background: rgb(255 255 255 / 72%); text-align: center; }
.empty-state__mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--crm-primary); background: #e6eff3; font-size: 19px; }
.empty-state h3 { margin: 0; font-size: 13px; }
.empty-state p { max-width: 42ch; margin: 0; color: var(--crm-muted); font-size: 10px; }
.empty-state--compact { min-height: 155px; padding: 14px; }
.loading-panel { min-height: 90px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); color: var(--crm-muted); background: white; font-size: 11px; }
.loading-spinner { width: 15px; height: 15px; border: 2px solid #cfdae0; border-top-color: var(--crm-primary); border-radius: 50%; animation: spin .7s linear infinite; }
.toast-note { position: fixed; right: 20px; bottom: 20px; z-index: 10; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #c7d9e2; border-left: 3px solid var(--crm-primary); border-radius: var(--crm-radius); background: white; box-shadow: 0 5px 18px rgb(15 23 42 / 12%); color: #314654; font-size: 11px; }
.two-column-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 20px; align-items: start; }
.pricing-layout .section-heading { align-items: center; }
.attachments-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.attachment-row { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: white; }
.attachment-row__body { min-width: 0; flex: 1; }
.attachment-row__body strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.attachment-row__body small { display: block; margin-top: 4px; color: var(--crm-muted); font-size: 9px; }
.file-mark { width: 31px; height: 35px; display: grid; place-items: center; flex: 0 0 31px; border: 1px solid #e5c7c9; border-radius: 3px; color: #a33842; background: #fcf1f1; font-size: 8px; font-weight: 800; }
.upload-row { display: flex; align-items: end; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: #fbfcfd; }
.upload-field { flex: 1; }
.upload-related { width: 210px; }
.upload-field input[type=file] { padding: 5px; }
.notice-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0; padding: 12px; border: 1px solid var(--crm-border); border-left: 3px solid var(--crm-primary); border-radius: var(--crm-radius); background: white; font-size: 11px; }
.notice-panel p { margin: 4px 0 0; color: var(--crm-muted); font-size: 10px; }
.notice-panel--warning { border-left-color: #b7791f; background: #fffdf8; }
.notice-panel--success { justify-content: flex-start; gap: 10px; border-left-color: var(--crm-accent); background: #f7fcf9; }
.notice-panel--success span { color: var(--crm-muted); font-size: 10px; }
.error-banner { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid #e7c7cb; border-left: 3px solid var(--crm-danger); border-radius: var(--crm-radius); background: #fff8f8; }
.error-banner__mark { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border-radius: 50%; color: var(--crm-danger); background: #f8e5e7; font-weight: 800; }
.error-banner > div { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.error-banner strong { font-size: 11px; }
.error-banner > div span { color: var(--crm-muted); font-size: 10px; }
.permission-check, .permission-muted { color: var(--crm-accent); font-size: 10px; font-weight: 700; }
.permission-muted { color: #8a969e; font-weight: 500; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background: var(--crm-surface); }
.auth-shell { width: min(100%, 360px); }
.login-box { width: 100%; }
.login-logo { display: grid; justify-items: center; gap: 8px; margin: 0 0 18px; color: var(--crm-text); font-size: 30px; font-weight: 300; text-align: center; }
.login-logo img { display: block; object-fit: contain; }
.login-logo strong { color: var(--crm-primary); font-weight: 750; }
.login-card { overflow: hidden; border: 1px solid var(--crm-border); border-top: 3px solid var(--crm-primary); border-radius: var(--crm-radius); background: var(--crm-surface-raised); box-shadow: 0 8px 26px rgb(23 33 43 / 9%); }
.login-card__body { padding: 24px; }
.login-title { margin: 0 0 18px; color: var(--crm-muted); font-size: 14px; font-weight: 400; text-align: center; }
.login-card .input-group-text { min-width: 42px; justify-content: center; color: var(--crm-muted); background: #f0f4f6; border-color: var(--crm-border); }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 14px; font-size: 12px; }
.login-options .form-check-input { margin-right: 5px; }
.login-submit { min-width: 104px; }
.login-passkey { margin-bottom: 16px; }
.login-links { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--crm-border); font-size: 12px; }
.auth-footer { margin-top: 16px; color: var(--crm-muted); font-size: 11px; text-align: center; }

#blazor-error-ui { display: none; position: fixed; z-index: 1000; right: 16px; bottom: 16px; max-width: 460px; padding: 12px 38px 12px 14px; border: 1px solid #dbaeb2; border-radius: var(--crm-radius); color: #70232c; background: #fff2f3; box-shadow: 0 4px 18px rgb(15 23 42 / 14%); font-size: 12px; }
#blazor-error-ui .reload { margin-left: 8px; font-weight: 700; }
#blazor-error-ui .dismiss { position: absolute; top: 8px; right: 10px; cursor: pointer; font-size: 18px; }
.validation-message { color: var(--crm-danger); font-size: 10px; }
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--crm-accent); }
.invalid { outline: 1px solid var(--crm-danger); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-width: 1100px) {
    .crm-content { padding-right: 20px; padding-left: 20px; }
    .crm-frame { grid-template-columns: 210px minmax(0, 1fr); }
    .crm-brand { min-width: 185px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-column-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .crm-header { height: 54px; flex-basis: 54px; gap: 12px; padding: 0 14px; }
    .crm-brand { min-width: 0; }
    .crm-header__context { margin-left: auto; font-size: 10px; }
    .crm-header__divider, .crm-header__context { display: none; }
    .crm-user { gap: 0; }
    .crm-user__name { display: none; }
    .crm-frame { display: flex; flex-direction: column; }
    .crm-sidebar { position: sticky; top: 0; z-index: 3; width: 100%; height: auto; min-height: 0; overflow-x: auto; padding: 6px 9px; border-right: 0; border-bottom: 1px solid var(--crm-border); }
    .crm-sidebar__group-label, .crm-sidebar__bottom { display: none; }
    .crm-nav { width: max-content; min-width: 100%; flex-direction: row; gap: 3px; }
    .crm-nav + .crm-sidebar__group-label { display: none; }
    .crm-nav__link { min-height: 34px; gap: 6px; padding: 6px 8px; font-size: 10px; white-space: nowrap; }
    .crm-nav__icon { width: auto; flex-basis: auto; font-size: 13px; }
    .crm-nav__count { display: none; }
    .crm-content { gap: 17px; padding: 20px 14px 24px; }
    .crm-footer { padding: 8px 14px; }
    .page-heading { align-items: flex-start; }
    .page-heading h1 { font-size: 19px; }
    .page-heading > .btn-crm { align-self: flex-start; }
    .metric-grid, .metric-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .metric-card { min-height: 108px; padding: 11px; }
    .metric-card__value { font-size: 22px; }
    .dashboard-bottom-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .toolbar-row { align-items: stretch; flex-direction: column; gap: 8px; }
    .toolbar-row .search-field { width: 100%; }
    .filter-tabs { width: 100%; }
    .filter-tab { min-height: 34px; padding-right: 8px; padding-left: 8px; }
    .form-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .attachments-grid { grid-template-columns: minmax(0, 1fr); }
    .upload-row { align-items: stretch; flex-direction: column; }
    .upload-related { width: auto; }
    .upload-row > .btn-crm { align-self: flex-end; }
    .data-table th, .data-table td { padding: 9px 10px; }
}

@media (max-width: 480px) {
    .crm-header__context { display: none; }
    .crm-nav__link { padding: 6px 7px; }
    .crm-nav__link span:last-child { max-width: 122px; overflow: hidden; text-overflow: ellipsis; }
    .crm-content { padding-right: 11px; padding-left: 11px; }
    .crm-footer { align-items: flex-start; flex-direction: column; gap: 2px; }
    .page-heading { flex-direction: column; }
    .page-heading > .btn-crm { align-self: flex-start; }
    .metric-grid, .metric-grid--three { grid-template-columns: minmax(0, 1fr); }
    .metric-card { min-height: 92px; }
    .form-grid--three, .form-grid--two { grid-template-columns: minmax(0, 1fr); }
    .section-heading { align-items: flex-start; }
    .pricing-layout .section-heading { flex-direction: column; }
    .search-field--compact { width: 100%; }
    .section-heading > .btn-crm { flex: 0 0 auto; }
    .error-banner { align-items: flex-start; flex-wrap: wrap; }
    .error-banner > .btn-crm { margin-left: 35px; }
    .login-card__body { padding: 20px; }
    .login-options { align-items: flex-start; }
}