:root {
    --ink: #171419;
    --muted: #716978;
    --line: #e5dfea;
    --soft: #f7f3f8;
    --brand: #8748b4;
    --brand-2: #a45bc0;
    --brand-1: #8748b4;
    --brand-soft: #f1e6f6;
    --warning: #b7791f;
    --danger: #b83232;
    --success: #168654;
    --shadow: 0 22px 70px rgba(20, 16, 23, .14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: #f1eff2;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    width: min(100%, 560px);
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    box-shadow: var(--shadow);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(20px, env(safe-area-inset-top)) 20px 18px;
    color: #fff;
    background: #050505;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background-color: #000;
    background-image: url("./micowey-logo.jpeg");
    background-repeat: no-repeat;
    background-position: -19px -35px;
    background-size: 172px 121px;
}

.brand-lockup p,
.brand-lockup h1 {
    margin: 0;
}

.brand-lockup p {
    color: #c9a9dc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
}

.brand-lockup h1 {
    margin-top: 3px;
    font-size: 19px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.server-connection-button {
    border-radius: 8px;
}

.server-status-dot {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 8px;
    height: 8px;
    border: 2px solid #050505;
    border-radius: 50%;
    background: #d89b2b;
}

.server-connection-button.connected .server-status-dot {
    background: #2ac77b;
}

.server-connection-button.offline .server-status-dot {
    background: #e35c5c;
}

.server-sync-banner {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-bottom: 1px solid #e9e2ed;
    color: #5f5764;
    background: #faf8fb;
    font-size: 12px;
}

.server-sync-banner.connected {
    color: #11653f;
    background: #f0faf5;
}

.server-sync-banner.warning {
    color: #8a5d12;
    background: #fff9ed;
}

.server-sync-banner svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.server-sync-banner.loading svg {
    animation: server-spin .9s linear infinite;
}

.server-sync-banner span {
    min-width: 0;
    flex: 1;
}

.server-sync-banner button {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 0;
    color: var(--brand);
    background: transparent;
    font-weight: 700;
}

@keyframes server-spin {
    to { transform: rotate(360deg); }
}

.server-auth-modal {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 12, 17, .58);
}

.server-auth-modal[hidden] {
    display: none;
}

.server-auth-dialog {
    width: min(100%, 460px);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.server-auth-head,
.server-member-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-member-panel[hidden],
.server-auth-form[hidden] {
    display: none;
}

.server-auth-head {
    justify-content: space-between;
    margin-bottom: 20px;
}

.server-auth-head span,
.server-member-panel span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.server-auth-head h2 {
    margin: 4px 0 0;
    font-size: 21px;
}

.server-member-panel {
    padding: 15px;
    border: 1px solid #cfe9db;
    border-radius: 8px;
    background: #f2fbf6;
}

.server-member-panel > svg {
    color: var(--success);
}

.server-member-panel > div {
    min-width: 0;
    flex: 1;
}

.server-member-panel > .server-member-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.server-member-actions button {
    min-height: 40px;
    padding: 8px 12px;
    white-space: nowrap;
}

.my-password-form {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #faf9fb;
}

@media (max-width: 540px) {
    .server-member-panel {
        flex-wrap: wrap;
    }

    .server-member-panel > .server-member-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
}

.server-auth-form {
    display: grid;
    gap: 14px;
}

.server-auth-form label {
    display: grid;
    gap: 7px;
    color: #39313e;
    font-size: 13px;
    font-weight: 700;
}

.server-auth-form input,
.server-auth-form select {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: #fff;
}

.server-auth-form .text-action {
    justify-content: center;
}

.server-auth-message {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.server-auth-message.error {
    color: var(--danger);
}

.server-auth-message.success {
    color: var(--success);
}

.role-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    font-size: 11px;
    font-weight: 700;
}

.icon-button {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.icon-button svg,
button svg,
.empty-state svg {
    width: 18px;
    height: 18px;
}

.badge-dot {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    color: #fff;
    background: #df3b7a;
    font-size: 11px;
    line-height: 20px;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 14px 14px 10px;
    background: #fff;
}

.summary-strip div {
    min-width: 0;
    padding: 11px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    text-align: center;
}

.summary-strip span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.summary-strip strong {
    display: block;
    margin-top: 3px;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
}

.top-tabs {
    --mobile-nav-count: 5;
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(var(--mobile-nav-count), minmax(64px, 1fr));
    gap: 4px;
    padding: 6px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    scrollbar-width: none;
}

.top-tabs::-webkit-scrollbar {
    display: none;
}

.top-tabs button {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
}

.top-tabs .active {
    color: #fff;
    background: var(--brand);
}

.desktop-only,
.desktop-nav-head,
.desktop-nav-footer {
    display: none;
}

.top-tabs .desktop-only {
    display: none;
}

.nav-badge {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    color: #fff;
    background: #df3b7a;
    font-size: 11px;
}

.view {
    display: none;
    padding: 16px;
}

.view.active {
    display: block;
}

.assistant-panel,
.form-card,
.result-card,
.work-order,
.staff-card,
.notice-item,
.metric-card,
.customer-card,
.device-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.assistant-panel {
    padding: 16px;
    background: linear-gradient(180deg, #faf6fc, #fff);
}

.assistant-head,
.section-title,
.result-head,
.work-order {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.assistant-head h2,
.section-title h2,
.work-order h3 {
    margin: 0;
    font-size: 18px;
}

.eyebrow,
.section-title span {
    color: var(--muted);
    font-size: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #67317e;
    background: #f1e6f6;
    font-size: 12px;
    white-space: nowrap;
}

.status-pill.warn {
    color: var(--warning);
    background: #fff5df;
}

.status-pill.danger {
    color: var(--danger);
    background: #ffe8e8;
}

.status-pill.success {
    color: var(--success);
    background: #e6f7ef;
}

.field-label,
label {
    display: block;
    color: #3a3540;
    font-size: 13px;
    font-weight: 600;
}

.field-label {
    margin-top: 16px;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 7px;
    border: 1px solid #d8d1e3;
    border-radius: 8px;
    outline: 0;
    color: var(--ink);
    background: #fff;
}

input,
select {
    height: 42px;
    padding: 0 12px;
}

textarea {
    resize: vertical;
    padding: 11px 12px;
    line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(135, 72, 180, .16);
}

input[readonly] {
    color: #4b4552;
    background: var(--soft);
}

.action-grid,
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.action-grid {
    margin-top: 12px;
}

.field-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: -4px;
}

.field-action-row button {
    min-width: 132px;
}

.location-control {
    display: grid;
    gap: 6px;
}

.location-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.location-input-row input {
    margin-top: 0;
}

.location-input-row button {
    min-width: 82px;
    padding: 0 11px;
}

.location-action-buttons {
    display: flex;
    gap: 6px;
}

.location-action-buttons button {
    white-space: nowrap;
}

.location-control small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.address-suggestions {
    display: grid;
    border-top: 1px solid var(--line);
}

.address-suggestions:empty {
    display: none;
}

.address-suggestion {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    width: 100%;
    padding: 10px 2px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.address-suggestion:last-child {
    border-bottom: 0;
}

.address-suggestion svg {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--brand);
}

.address-suggestion span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.address-suggestion strong,
.address-suggestion small {
    overflow-wrap: anywhere;
}

.address-suggestion strong {
    font-size: 12px;
    line-height: 1.5;
}

.address-suggestion small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.address-suggestions.loading,
.address-suggestions.empty {
    padding: 10px 2px;
    color: var(--muted);
    font-size: 11px;
}

.address-suggestions.empty p {
    margin: 0 0 8px;
}

.address-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d9c3e2;
    border-radius: 6px;
    color: #6f2f87;
    background: #fbf6fc;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.address-external-link svg {
    width: 15px;
    height: 15px;
}

.address-attribution {
    padding-top: 7px;
    color: var(--muted);
    font-size: 9px;
    text-align: right;
}

.field-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
}

.shipment-recipient-section {
    display: grid;
    gap: 11px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.shipment-recipient-section > button {
    justify-self: start;
    padding: 0 14px;
}

.shipping-info-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 14px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.shipping-info-block div {
    display: grid;
    gap: 3px;
}

.shipping-info-block span {
    color: var(--muted);
    font-size: 11px;
}

.shipping-info-block strong {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
    overflow-wrap: anywhere;
    user-select: text;
}

.shipping-info-block .shipping-address-line {
    grid-column: 1 / -1;
}

.shipping-copy-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

button.primary,
button.secondary {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
}

button.primary {
    color: #fff;
    background: var(--brand);
}

button.secondary {
    color: #67317e;
    background: #f1e6f6;
}

button.wide {
    width: 100%;
    margin-top: 4px;
}

.section-title {
    margin: 20px 0 10px;
}

.dashboard-heading {
    margin-top: 4px;
}

.dashboard-heading > div {
    min-width: 0;
}

.compact-title {
    align-items: center;
}

.compact-title h2 {
    font-size: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.metric-card {
    min-height: 94px;
    padding: 13px;
    background: var(--soft);
}

button.metric-card {
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

button.metric-card:hover {
    border-color: #bea7cd;
    transform: translateY(-1px);
}

button.metric-card.active {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand), 0 5px 14px rgba(118, 60, 151, .1);
}

.metric-card span,
.metric-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.metric-card strong {
    display: block;
    margin: 5px 0 3px;
    font-size: 24px;
}

.metric-card.attention {
    border-color: #efd9a6;
    background: #fffaf0;
}

.metric-card.demo-completed {
    border-color: #a9dbc5;
    background: #eefaf5;
}

.metric-card.demo-completed strong {
    color: #167a55;
}

.metric-card.demo-preparing {
    border-color: #bfd0ea;
    background: #f2f7fd;
}

.metric-card.demo-preparing strong {
    color: #315f96;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.segmented-control button {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
}

.segmented-control button.active {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 5px rgba(28, 22, 42, .1);
}

.customer-stage-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 14px;
}

.customer-stage-tabs button {
    padding: 0 5px;
    font-size: 11px;
    line-height: 1.25;
}

.order-tabs {
    margin-bottom: 12px;
}

.demo-rule-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.demo-rule-grid div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.demo-rule-grid span {
    color: var(--muted);
    font-size: 12px;
}

.demo-rule-grid strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.demo-device-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.demo-device-metrics div {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-bottom: 2px solid var(--brand);
    background: var(--soft);
}

.demo-device-metrics span {
    color: var(--muted);
    font-size: 11px;
}

.demo-device-metrics strong {
    font-size: 15px;
}

.demo-device-assignment {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding: 10px;
    background: var(--soft);
}

.demo-device-assignment span,
.demo-device-assignment small {
    color: var(--muted);
    font-size: 11px;
}

.demo-device-assignment strong {
    font-size: 13px;
}

.demo-device-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.demo-device-picker legend {
    margin-bottom: 7px;
    color: #3a3540;
    font-size: 13px;
    font-weight: 600;
}

.demo-order-alert {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #efc7d8;
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    background: #fff7fa;
}

.demo-order-alert[hidden] {
    display: none;
}

.demo-order-alert > svg {
    color: var(--danger);
}

.demo-order-alert > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.demo-order-alert strong {
    font-size: 13px;
}

.demo-order-alert > div span {
    color: var(--muted);
    font-size: 11px;
}

.demo-device-availability-list {
    overflow: hidden;
    border: 1px solid #d8d1e3;
    border-radius: 8px;
}

.demo-device-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 10px 11px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: #fff;
    font-weight: 400;
    cursor: pointer;
}

.demo-device-option:last-child {
    border-bottom: 0;
}

.demo-device-option.available:has(input:checked) {
    background: #f0faf5;
    box-shadow: inset 3px 0 0 var(--success);
}

.demo-device-option.unavailable {
    color: #8c8790;
    background: #f3f2f4;
    cursor: not-allowed;
}

.demo-device-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--brand);
}

.demo-device-option-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.demo-device-option-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.demo-device-option-title strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.demo-device-option-title em {
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    background: var(--success);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.demo-device-option-main small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.demo-device-option.unavailable .demo-device-option-main small {
    color: #938e97;
}

.demo-device-picker > small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.demo-device-picker-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 64px;
    padding: 12px;
    color: var(--muted);
    background: var(--soft);
    font-size: 12px;
}

.demo-device-picker-empty svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: var(--brand);
}

.demo-duration-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid #dfcfe7;
    border-radius: 8px;
    background: #faf5fc;
}

.demo-duration-preview div {
    display: grid;
    gap: 3px;
}

.demo-duration-preview span {
    color: var(--muted);
    font-size: 11px;
}

.demo-duration-preview strong {
    font-size: 13px;
}

.demo-submit-success {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #a9d9c0;
    border-left: 4px solid var(--success);
    border-radius: 8px;
    color: #174f35;
    background: #effaf4;
}

.demo-submit-success[hidden] {
    display: none;
}

.demo-submit-success > svg {
    width: 26px;
    height: 26px;
}

.demo-submit-success > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.demo-submit-success strong,
.demo-submit-success span,
.demo-submit-success small {
    overflow-wrap: anywhere;
}

.workflow-success-toast {
    position: fixed;
    z-index: 1200;
    top: 18px;
    left: 50%;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: min(440px, calc(100vw - 28px));
    padding: 12px 14px;
    border: 1px solid #a9d9c0;
    border-left: 4px solid var(--success);
    border-radius: 8px;
    color: #174f35;
    background: #fff;
    box-shadow: 0 12px 32px rgba(31, 24, 34, 0.18);
    transform: translateX(-50%);
}

.workflow-success-toast[hidden] {
    display: none;
}

.workflow-success-toast > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.workflow-success-toast strong,
.workflow-success-toast span {
    overflow-wrap: anywhere;
}

.workflow-success-toast.is-error {
    background: #9f2d35;
}

.asset-form-feedback {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff3f3;
    color: #a12b34;
    font-weight: 700;
}

.asset-form-feedback.is-success {
    background: #ecfbf3;
    color: #16724a;
}

.asset-form-feedback[hidden] {
    display: none;
}

.workflow-success-toast span {
    color: #4d715f;
    font-size: 11px;
}

.demo-submit-success span {
    font-size: 12px;
}

.demo-submit-success small {
    color: #4d715f;
    font-size: 11px;
}

.nearest-device-recommendation {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.nearest-device-recommendation div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.nearest-device-recommendation span,
.nearest-device-recommendation small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.nearest-device-recommendation strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.nearest-device-recommendation > svg {
    flex: 0 0 auto;
    color: var(--brand);
}

.nearest-device-recommendation.available {
    border-color: #bfe3d1;
    background: #f0faf5;
}

.nearest-device-recommendation.unavailable {
    border-color: #efc7c7;
    color: var(--danger);
    background: #fff5f5;
}

.payment-qr-panel {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f7f0fa;
}

.payment-qr-button {
    width: 92px;
    height: 92px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid #dccbe5;
    border-radius: 6px;
    background: #fff;
}

.official-qr-crop {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
}

.official-qr-crop img {
    position: absolute;
    top: -132%;
    left: -57%;
    width: 214%;
    max-width: none;
    height: auto;
}

.payment-qr-panel strong {
    display: block;
    font-size: 14px;
}

.payment-qr-panel p {
    margin-top: 5px;
}

.payment-qr-panel > div > span {
    display: inline-block;
    margin-top: 7px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
}

.button-row button:disabled {
    color: #aaa3ad;
    background: #f0edf2;
    cursor: not-allowed;
}

.modal-open {
    overflow: hidden;
}

.payment-qr-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(20, 17, 26, .68);
}

.payment-qr-modal[hidden] {
    display: none;
}

.payment-qr-dialog {
    width: min(100%, 390px);
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(20, 17, 26, .32);
    text-align: center;
}

.payment-qr-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.payment-qr-dialog-head span {
    color: var(--muted);
    font-size: 11px;
}

.payment-qr-dialog-head h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.icon-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
}

.payment-qr-dialog > .official-qr-crop.large {
    width: min(78vw, 250px);
    margin: 18px auto 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.payment-qr-dialog > strong {
    display: block;
    font-size: 24px;
}

.payment-qr-dialog > p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.qr-payment-note {
    margin: 12px 0;
    padding: 9px;
    border-radius: 6px;
    color: #5d326f;
    background: #f5eaf8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.order-panel {
    display: none;
}

.order-panel.active {
    display: block;
}

.order-list {
    display: grid;
    gap: 10px;
}

.order-card,
.commission-standard,
.commission-result {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.order-card {
    padding: 13px;
}

.order-card h3,
.order-card p {
    margin: 0;
}

.order-card h3 {
    font-size: 15px;
}

.order-card p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.order-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin-top: 11px;
    font-size: 12px;
}

.order-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.demo-order-timeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--line);
}

.demo-order-timeline div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    background: #fff;
}

.demo-order-timeline span {
    color: var(--muted);
    font-size: 10px;
}

.demo-order-timeline strong {
    font-size: 11px;
    overflow-wrap: anywhere;
}

.demo-order-timeline .done {
    box-shadow: inset 0 3px 0 var(--success);
}

.demo-order-timeline .pending {
    color: var(--muted);
    background: #f7f6f8;
}

.commission-standard {
    overflow: hidden;
}

.commission-base,
.tier-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.commission-base {
    color: #fff;
    background: #27212f;
}

.tier-row:last-child {
    border-bottom: 0;
}

.tier-row span {
    color: var(--muted);
}

.commission-result {
    display: none;
    margin-top: 12px;
    padding: 14px;
}

.commission-result.visible {
    display: block;
}

.commission-result h3,
.commission-result p {
    margin: 0;
}

.commission-result h3 {
    font-size: 15px;
}

.commission-amount {
    display: block;
    margin: 8px 0 5px;
    color: var(--brand);
    font-size: 28px;
}

.commission-breakdown {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.permission-toolbar {
    margin-top: 4px;
}

.role-summary {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.role-summary h3,
.role-summary p {
    margin: 0;
}

.role-summary h3 {
    font-size: 15px;
}

.role-summary p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.permission-matrix {
    display: grid;
    gap: 8px;
}

.permission-item {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.permission-item h3,
.permission-item p {
    margin: 0;
}

.permission-item h3 {
    font-size: 14px;
}

.permission-item p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.permission-item input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
}

.permission-fixed-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.permission-fixed-status svg {
    width: 17px;
    height: 17px;
}

.permission-save {
    margin-top: 12px;
}

.approval-list {
    display: grid;
    gap: 9px;
}

.issued-account-list {
    margin-top: 12px;
}

.issued-account-status[hidden] {
    display: none;
}

.inline-copy-action {
    display: inline;
    width: auto;
    min-height: 0;
    margin-left: 6px;
    padding: 0;
    border: 0;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    background: transparent;
}

.approval-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.approval-card h3,
.approval-card p {
    margin: 0;
}

.approval-card h3 {
    font-size: 14px;
}

.approval-card p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.approval-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
    margin-top: 10px;
}

.approval-actions select {
    height: 40px;
    margin: 0;
}

.approval-actions button {
    min-height: 40px;
    padding: 0 11px;
}

.scope-list {
    display: grid;
    gap: 8px;
}

.scope-list div {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-left: 3px solid var(--brand-2);
    background: var(--soft);
}

.scope-list strong {
    font-size: 13px;
}

.scope-list span {
    color: var(--muted);
    font-size: 12px;
}

.permission-hidden {
    display: none !important;
}

.customer-list,
.device-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.customer-card,
.device-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 13px;
}

.customer-card {
    overflow: hidden;
}

.customer-card-head,
.device-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.customer-card-head > div,
.customer-meta,
.customer-actions,
.customer-preference-summary {
    min-width: 0;
    max-width: 100%;
}

.customer-card h3,
.customer-card p,
.device-card h3,
.device-card p {
    margin: 0;
}

.customer-card h3,
.device-card h3 {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.customer-card p,
.device-card p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.customer-meta,
.device-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 10px;
    color: #49424f;
    font-size: 12px;
}

.customer-preference-summary,
.customer-profile-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid #eadff0;
    border-radius: 8px;
    background: #faf7fb;
    color: #4d4353;
    font-size: 12px;
    line-height: 1.55;
}

.customer-preference-summary svg,
.customer-profile-note svg,
.selected-customer-preference svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--primary);
}

.customer-preference-summary span {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-profile-note {
    margin-top: 0;
}

.customer-profile-note div,
.customer-profile-note span,
.customer-profile-note strong {
    display: block;
    min-width: 0;
}

.customer-profile-note span {
    color: var(--muted);
}

.customer-profile-note strong {
    margin-top: 3px;
    color: var(--ink);
    font-weight: 600;
}

.device-service-summary {
    display: grid;
    gap: 7px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.device-service-summary > strong {
    font-size: 12px;
}

.device-service-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.device-service-contact span {
    color: var(--muted);
}

.device-service-contact a {
    color: var(--brand-1);
    font-weight: 700;
    text-align: right;
    text-decoration: none;
}

.customer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 11px;
}

.customer-actions button {
    min-height: 40px;
}

.customer-demo-strip {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin-top: 11px;
    padding: 10px;
    border-left: 3px solid #6d8fbd;
    background: #f2f7fd;
}

.customer-demo-strip.completed {
    border-left-color: #2e9b72;
    background: #eefaf5;
}

.customer-demo-strip > svg {
    width: 19px;
    height: 19px;
    color: #476f9f;
}

.customer-demo-strip.completed > svg {
    color: #21815f;
}

.customer-demo-strip div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.customer-demo-strip strong {
    font-size: 12px;
    line-height: 1.4;
}

.customer-demo-strip span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.customer-result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.customer-result-actions button {
    width: 100%;
    min-height: 48px;
    min-width: 0;
    padding-inline: 10px;
    white-space: nowrap;
}

.customer-result-actions .demo-shortcut-button {
    color: var(--brand-1);
    background: var(--brand-soft);
}

.customer-result-actions .purchase-shortcut-button {
    box-shadow: 0 6px 14px rgba(139, 61, 184, .16);
}

.text-action {
    min-height: 40px;
    padding: 0 8px;
    border: 0;
    color: var(--brand);
    background: transparent;
    font-weight: 700;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    line-height: 1.5;
}

.check-row input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.form-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px;
    border-radius: 8px;
    color: #4f4860;
    background: var(--soft);
    font-size: 12px;
    line-height: 1.55;
}

.form-note svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    color: var(--brand);
}

.form-note.success-note {
    color: var(--success);
    background: #eaf7f0;
}

.form-note.success-note svg {
    color: var(--success);
}

.form-note.danger-note {
    color: var(--danger);
    background: #fff0f0;
}

.form-note.danger-note svg {
    color: var(--danger);
}

.form-card {
    display: grid;
    gap: 13px;
    padding: 14px;
}

#workOrderCompletion[hidden] {
    display: none !important;
}

.form-card.compact {
    margin-top: 14px;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 12px;
}

.search-bar input {
    margin-top: 0;
}

.search-bar button {
    min-width: 92px;
    padding: 0 14px;
}

.consumable-device-picker {
    display: grid;
    gap: 8px;
}

.device-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 7px;
}

.device-search-row input,
.device-search-row button {
    margin-top: 0;
}

.device-search-row button {
    min-width: 42px;
    padding: 0;
}

.selected-consumable-device {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--brand);
    background: var(--soft);
}

.selected-consumable-device > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.selected-consumable-device strong,
.selected-consumable-device span {
    overflow-wrap: anywhere;
}

.selected-consumable-device strong {
    font-size: 13px;
}

.selected-consumable-device span,
.consumable-device-results > small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.selected-consumable-device button {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 38px;
    padding: 0 10px;
}

.consumable-device-results {
    display: grid;
    border-top: 1px solid var(--line);
}

.consumable-device-results:empty {
    display: none;
}

.consumable-device-results > small {
    padding: 8px 2px 6px;
}

.consumable-device-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 9px 2px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.consumable-device-result > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.consumable-device-result strong,
.consumable-device-result small {
    overflow-wrap: anywhere;
}

.consumable-device-result strong {
    font-size: 12px;
}

.consumable-device-result small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.consumable-device-result > span:last-child {
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.consumable-sku-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.consumable-sku-fieldset legend {
    margin-bottom: 7px;
    color: #3a3540;
    font-size: 13px;
    font-weight: 600;
}

.consumable-sku-list {
    overflow: hidden;
    border: 1px solid #d8d1e3;
    border-radius: 8px;
}

.consumable-sku-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.consumable-sku-option:last-child {
    border-bottom: 0;
}

.consumable-sku-option:has([data-consumable-sku]:checked) {
    background: #f8f3fb;
}

.sku-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
}

.sku-choice input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    accent-color: var(--brand);
}

.sku-choice span,
.sku-choice strong,
.sku-choice small {
    display: block;
    min-width: 0;
}

.sku-choice strong {
    color: var(--ink);
    font-size: 14px;
}

.sku-choice small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.sku-quantity {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.sku-quantity input {
    height: 36px;
    margin-top: 4px;
    padding: 0 8px;
    text-align: center;
}

.sku-quantity input:disabled {
    color: #aaa3b0;
    background: #f3f1f4;
}

.consumable-order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-top: 2px solid var(--brand);
    background: #f8f6f9;
}

.consumable-order-summary span,
.consumable-order-summary small {
    display: block;
}

.consumable-order-summary span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.consumable-order-summary small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.consumable-order-summary strong {
    color: var(--brand);
    font-size: 20px;
}

.consumable-order-lines {
    display: grid;
    gap: 6px;
    margin: 11px 0;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.consumable-order-lines span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.consumable-order-lines strong {
    color: var(--ink);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.order-progress {
    display: grid;
    gap: 8px;
}

.order-progress .info-row {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.order-progress .info-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.service-contact-section {
    display: grid;
    gap: 9px;
    margin-top: 5px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.service-contact-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.service-contact-heading strong {
    font-size: 14px;
}

.service-contact-heading span {
    color: var(--muted);
    font-size: 11px;
}

.service-contact-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.service-contact-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 74px;
    padding: 10px;
    background: #fff;
}

.service-contact-row + .service-contact-row {
    border-top: 1px solid var(--line);
}

.service-contact-row.pending {
    background: #faf9fb;
}

.service-contact-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    color: var(--brand-1);
    background: var(--brand-soft);
}

.service-contact-icon svg {
    width: 18px;
    height: 18px;
}

.service-contact-main {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.service-contact-main span,
.service-contact-main small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.service-contact-main strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.service-contact-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.service-contact-actions .icon-text-button,
.service-contact-actions .icon-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #d9c7e6;
    border-radius: 8px;
    color: var(--brand-1);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.service-contact-actions .icon-text-button {
    padding: 0 10px;
}

.service-contact-actions .icon-button {
    width: 38px;
    height: 38px;
    padding: 0;
}

.service-contact-actions svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    display: grid;
    min-height: 180px;
    place-items: center;
    padding: 22px;
    border: 1px dashed #d8d1e3;
    border-radius: 8px;
    color: var(--muted);
    background: #fbfafc;
    text-align: center;
}

.empty-state.compact-empty {
    min-height: 118px;
}

.follow-search-results {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.follow-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: 8px;
    background: #fff;
}

.follow-search-item.restricted {
    border-left-color: #c6c0cc;
    background: #fbfafc;
}

.follow-search-item > div {
    min-width: 0;
}

.follow-search-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.follow-search-item strong,
.follow-search-item p,
.follow-search-item small {
    display: block;
    margin: 0;
}

.follow-search-item strong {
    font-size: 14px;
}

.follow-search-item p,
.follow-search-item small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.follow-search-item button {
    flex: 0 0 auto;
}

.follow-search-confirmation {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #b8dfc9;
    border-radius: 8px;
    color: var(--success);
    background: #eef9f3;
    font-size: 13px;
}

.follow-search-confirmation svg {
    width: 18px;
    height: 18px;
}

.selected-customer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f4f8;
}

.selected-customer-bar span,
.selected-customer-bar strong,
.selected-customer-bar small {
    display: block;
}

.selected-customer-bar span,
.selected-customer-bar small {
    color: var(--muted);
    font-size: 12px;
}

.selected-customer-bar strong {
    margin: 3px 0;
    font-size: 15px;
}

.selected-customer-bar .selected-customer-preference {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 7px;
    color: #5a4c60;
    line-height: 1.45;
}

.timeline-preference {
    display: block;
    margin-top: 7px;
    color: #6f447d;
    line-height: 1.5;
}

#followWorkspace[hidden] {
    display: none;
}

.result-card {
    overflow: hidden;
}

.result-head {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfafc;
}

.result-card h3,
.result-card p {
    margin: 0;
}

.result-body {
    display: grid;
    gap: 11px;
    padding: 14px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.info-row strong {
    color: var(--ink);
    text-align: right;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.timeline {
    display: grid;
    gap: 10px;
}

.business-detail-fields {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-left: 3px solid var(--brand);
    background: #faf7fb;
}

.business-mode-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.business-mode-head strong {
    font-size: 14px;
}

.business-mode-head span {
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.installment-fields {
    display: grid;
    gap: 10px;
}

.timeline-item {
    position: relative;
    padding: 13px 13px 13px 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.timeline-item:before {
    position: absolute;
    top: 17px;
    left: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-2);
    content: "";
}

.timeline-item h3,
.timeline-item p {
    margin: 0;
}

.timeline-item h3 {
    font-size: 14px;
}

.timeline-item p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.dispatch-board,
.staff-list,
.notice-log {
    display: grid;
    gap: 10px;
}

.work-order {
    align-items: center;
    padding: 14px;
}

.work-order p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.staff-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
}

.staff-card h3,
.staff-card p {
    margin: 0;
}

.staff-card h3 {
    font-size: 15px;
}

.staff-card p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.staff-controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.staff-controls select {
    width: 82px;
    height: 38px;
    margin: 0;
    padding: 0 8px;
    font-size: 12px;
}

.staff-controls button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
}

.staff-controls button:disabled {
    color: #aaa3ad;
    background: #f0edf2;
}

.notice-log {
    margin-top: 4px;
}

.notice-log.full {
    margin-top: 0;
}

.notice-center-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.notice-center-toolbar > span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.notice-center-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.notice-center-actions button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
}

.notice-center-actions button:disabled {
    color: #aaa3ad;
    background: #f0edf2;
    cursor: not-allowed;
}

.notice-empty {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 150px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.notice-empty strong {
    color: var(--ink);
    font-size: 15px;
}

.notice-empty span {
    font-size: 12px;
}

.notice-item {
    display: grid;
    width: 100%;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.notice-item:hover {
    border-color: #bd9ad3;
    background: #fcf9fe;
}

.notice-item.is-read {
    background: #fafafa;
}

.notice-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
}

.notice-item.is-read .notice-status-dot {
    background: #bbb7be;
}

.notice-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.notice-copy strong {
    font-size: 14px;
}

.notice-copy > span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.notice-open-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.notice-open-label svg {
    width: 14px;
    height: 14px;
}

.mobile-contract-heading > div {
    min-width: 0;
}

.mobile-contract-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.mobile-contract-steps > div {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 6px;
    padding: 11px 6px;
    background: #fff;
    text-align: center;
}

.mobile-contract-steps span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--brand);
    font-size: 11px;
    font-weight: 800;
}

.mobile-contract-steps strong {
    font-size: 11px;
    line-height: 1.35;
}

.mobile-contract-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.mobile-contract-search svg {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.mobile-contract-search input {
    min-width: 0;
    margin: 0;
    border: 0;
    background: transparent;
}

.mobile-contract-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.mobile-contract-summary > div {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border-left: 3px solid #bea0d1;
    background: #faf7fc;
}

.mobile-contract-summary span {
    color: var(--muted);
    font-size: 10px;
}

.mobile-contract-summary strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.mobile-contract-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.mobile-contract-actions button {
    min-width: 0;
    min-height: 42px;
    padding: 0 8px;
    font-size: 11px;
}

.purchase-contract-button {
    margin-top: 2px;
}

.service-task-contact-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.service-task-contact-heading strong {
    font-size: 13px;
}

.service-task-contact-heading span {
    color: var(--muted);
    font-size: 11px;
}

.service-counterpart-list {
    display: grid;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.service-counterpart-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 10px;
    background: #fff;
}

.service-counterpart-row + .service-counterpart-row {
    border-top: 1px solid var(--line);
}

.service-counterpart-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    color: #23684f;
    background: #eaf7f0;
}

.service-counterpart-icon.dealer {
    color: #754197;
    background: #f1e6f6;
}

.service-counterpart-icon svg {
    width: 18px;
    height: 18px;
}

.service-counterpart-main {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.service-counterpart-main span,
.service-counterpart-main small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.service-counterpart-main strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.service-call-action {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #cfe3d8;
    border-radius: 8px;
    color: #23684f;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.service-call-action svg {
    width: 15px;
    height: 15px;
}

.service-recipient-section .service-counterpart-list {
    margin-top: 0;
}

.staff-card {
    flex-wrap: wrap;
}

.staff-profile {
    min-width: 0;
}

.staff-monthly-metrics {
    display: grid;
    width: 100%;
    flex: 0 0 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.staff-monthly-metrics div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.staff-monthly-metrics span {
    color: var(--muted);
    font-size: 11px;
}

.staff-monthly-metrics strong {
    color: var(--ink);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.service-review-button {
    margin-top: 11px;
}

.service-review-result {
    display: grid;
    gap: 3px;
    margin-top: 11px;
    padding: 10px 12px;
    border-left: 3px solid var(--success);
    background: #eaf7f0;
}

.service-review-result span,
.service-review-result small {
    color: #39735c;
    font-size: 11px;
}

.service-review-result strong {
    color: #1d5c43;
    font-size: 14px;
}

.service-evaluation-panel {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.service-evaluation-panel > div:first-child {
    display: grid;
    gap: 3px;
}

.service-evaluation-panel strong {
    font-size: 13px;
}

.service-evaluation-panel span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.evaluation-dialog {
    width: min(100%, 460px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    text-align: left;
}

.evaluation-qr-stage {
    text-align: center;
}

.evaluation-qr-stage > strong,
.evaluation-qr-stage > p {
    display: block;
    margin: 0;
}

.evaluation-qr-stage > strong {
    font-size: 15px;
}

.evaluation-qr-stage > p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.evaluation-qr-code {
    display: grid;
    width: 232px;
    height: 232px;
    margin: 16px auto 12px;
    place-items: center;
    padding: 6px;
    border: 1px solid var(--line);
    background: #fff;
}

.evaluation-qr-code canvas,
.evaluation-qr-code img {
    display: block;
    width: 220px;
    height: 220px;
}

.evaluation-qr-unavailable {
    display: grid;
    gap: 8px;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
}

.evaluation-security-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 12px;
    padding: 9px 10px;
    color: #53635c;
    background: #f0f5f2;
    font-size: 11px;
    line-height: 1.45;
    text-align: left;
}

.evaluation-security-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.evaluation-form {
    display: grid;
    gap: 13px;
    margin-top: 14px;
}

.evaluation-form[hidden],
.evaluation-success[hidden],
.evaluation-qr-stage[hidden] {
    display: none;
}

.evaluation-task-summary {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border-left: 3px solid var(--brand);
    background: var(--soft);
}

.evaluation-task-summary span,
.evaluation-task-summary small {
    color: var(--muted);
    font-size: 11px;
}

.evaluation-task-summary strong {
    font-size: 14px;
}

.otp-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.otp-row input {
    margin-top: 0;
}

.otp-row button {
    min-width: 104px;
    padding: 0 12px;
}

.evaluation-rating-fieldset,
.review-tag-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.evaluation-rating-fieldset legend,
.review-tag-fieldset legend {
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.rating-picker {
    display: grid;
    grid-template-columns: repeat(5, 44px);
    gap: 8px;
}

.rating-picker button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #aaa3ad;
    background: #fff;
}

.rating-picker button.active {
    border-color: #d79a39;
    color: #bd7414;
    background: #fff7e8;
}

.rating-picker svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.evaluation-rating-fieldset small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.review-tag-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.review-tag-grid label {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.review-tag-grid input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0;
}

.review-tag-grid span {
    font-size: 12px;
}

.evaluation-success {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    place-items: center;
    text-align: center;
}

.evaluation-success > svg {
    width: 46px;
    height: 46px;
    color: var(--success);
}

.evaluation-success h3,
.evaluation-success p {
    margin: 0;
}

.evaluation-success h3 {
    font-size: 18px;
}

.evaluation-success p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.enterprise-view {
    color: #202127;
}

.enterprise-page-head,
.enterprise-panel-head,
.enterprise-toolbar,
.enterprise-head-actions,
.enterprise-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.enterprise-page-head {
    align-items: flex-end;
    margin-bottom: 18px;
}

.enterprise-page-head h2,
.enterprise-page-head p,
.enterprise-panel h3,
.enterprise-panel-head span {
    margin: 0;
}

.enterprise-page-head h2 {
    margin-top: 4px;
    font-size: 24px;
    letter-spacing: 0;
}

.enterprise-page-head p {
    max-width: 780px;
    margin-top: 7px;
    color: #6d6f78;
    font-size: 13px;
    line-height: 1.55;
}

.enterprise-head-actions {
    flex: 0 0 auto;
}

.enterprise-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.enterprise-kpi-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.enterprise-kpi {
    min-width: 0;
    min-height: 112px;
    padding: 16px;
    border: 1px solid #e2e3e8;
    border-top: 3px solid #7d4ba2;
    border-radius: 6px;
    background: #fff;
}

.enterprise-kpi:nth-child(2) { border-top-color: #168654; }
.enterprise-kpi:nth-child(3) { border-top-color: #3375b8; }
.enterprise-kpi:nth-child(4) { border-top-color: #c48725; }
.enterprise-kpi:nth-child(5) { border-top-color: #b6465b; }

.enterprise-kpi > span,
.enterprise-kpi > small,
.enterprise-kpi > strong {
    display: block;
}

.enterprise-kpi > span {
    color: #666a73;
    font-size: 12px;
}

.enterprise-kpi > strong {
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.enterprise-kpi > small {
    margin-top: 7px;
    color: #858892;
    font-size: 11px;
    line-height: 1.4;
}

.enterprise-kpi > small.positive {
    color: var(--success);
}

.enterprise-kpi > small.negative {
    color: var(--danger);
}

.enterprise-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .8fr);
    gap: 16px;
    margin-bottom: 16px;
}

.enterprise-panel {
    min-width: 0;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid #e2e3e8;
    border-radius: 6px;
    background: #fff;
}

.enterprise-panel-head {
    align-items: flex-start;
    margin-bottom: 15px;
}

.enterprise-panel h3 {
    font-size: 16px;
}

.enterprise-panel-head span {
    display: block;
    margin-top: 4px;
    color: #7b7e87;
    font-size: 11px;
}

.pipeline-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.pipeline-step {
    min-width: 0;
    padding: 13px 12px;
    border-left: 3px solid #aa7fc8;
    background: #f7f5f8;
}

.pipeline-step:nth-child(2) { border-left-color: #5d8fc3; }
.pipeline-step:nth-child(3) { border-left-color: #d69a40; }
.pipeline-step:nth-child(4) { border-left-color: #4ea984; }
.pipeline-step:nth-child(5) { border-left-color: #2a795c; }

.pipeline-step span,
.pipeline-step strong,
.pipeline-step small {
    display: block;
}

.pipeline-step span {
    color: #666a73;
    font-size: 11px;
}

.pipeline-step strong {
    margin: 6px 0 4px;
    font-size: 22px;
}

.pipeline-step small {
    color: #8a8d95;
    font-size: 10px;
    line-height: 1.35;
}

.risk-list,
.compact-record-list,
.asset-overview,
.performance-ranking {
    display: grid;
    gap: 8px;
}

.risk-item,
.compact-record,
.asset-overview-row,
.ranking-row {
    display: grid;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 0;
    border-bottom: 1px solid #ececf0;
}

.risk-item:last-child,
.compact-record:last-child,
.asset-overview-row:last-child,
.ranking-row:last-child {
    border-bottom: 0;
}

.risk-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.risk-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 6px;
    color: #b2681e;
    background: #fff4df;
}

.risk-icon.danger {
    color: var(--danger);
    background: #fff0f0;
}

.risk-icon svg {
    width: 16px;
    height: 16px;
}

.risk-item strong,
.risk-item small,
.compact-record strong,
.compact-record span,
.compact-record small,
.asset-overview-row strong,
.asset-overview-row span,
.ranking-row strong,
.ranking-row span {
    display: block;
    min-width: 0;
}

.risk-item strong,
.compact-record strong,
.asset-overview-row strong,
.ranking-row strong {
    font-size: 12px;
}

.risk-item small,
.compact-record span,
.compact-record small,
.asset-overview-row span,
.ranking-row span {
    margin-top: 3px;
    color: #7b7e87;
    font-size: 11px;
    line-height: 1.4;
}

.compact-record {
    grid-template-columns: minmax(0, 1fr) auto;
}

.asset-overview-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.asset-overview-row > strong:last-child {
    font-size: 18px;
}

.enterprise-toolbar {
    justify-content: flex-start;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e2e3e8;
    border-radius: 6px;
    background: #fff;
}

.enterprise-toolbar select {
    width: 170px;
    margin: 0;
}

.enterprise-search {
    position: relative;
    width: min(420px, 100%);
}

.enterprise-search svg {
    position: absolute;
    top: 13px;
    left: 12px;
    z-index: 1;
    width: 17px;
    height: 17px;
    color: #8a8d95;
}

.enterprise-search input {
    height: 42px;
    margin: 0;
    padding-left: 38px;
}

.enterprise-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.enterprise-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    table-layout: auto;
}

.enterprise-table th,
.enterprise-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9e9ed;
    text-align: left;
    vertical-align: middle;
}

.enterprise-table select {
    width: auto;
    min-width: 104px;
    height: 36px;
    margin: 0;
    padding: 0 30px 0 9px;
    font-size: 11px;
}

.enterprise-table th {
    color: #777a84;
    background: #f7f7f9;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.enterprise-table td {
    color: #34363d;
    font-size: 12px;
    line-height: 1.45;
}

.enterprise-table tbody tr:hover {
    background: #faf9fb;
}

.enterprise-table td strong,
.enterprise-table td small {
    display: block;
}

.enterprise-table td small {
    margin-top: 3px;
    color: #858892;
    font-size: 10px;
}

.enterprise-table .money {
    font-weight: 700;
    white-space: nowrap;
}

.enterprise-table .address-cell {
    min-width: 230px;
    max-width: 320px;
}

.table-action {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #d7c5e4;
    border-radius: 6px;
    color: #6d368d;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.table-action + .table-action {
    margin-left: 5px;
}

.table-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 148px;
}

.table-action-row .table-action + .table-action {
    margin-left: 0;
}

.table-action.danger {
    border-color: #ecc5c5;
    color: var(--danger);
}

.secondary.danger {
    border-color: #ecc5c5;
    color: var(--danger);
    background: #fff;
}

.table-action.success {
    border-color: #b8dfc9;
    color: var(--success);
}

.table-action:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.asset-create-form[hidden] {
    display: none;
}

.asset-create-form {
    display: block;
    border-left: 4px solid var(--brand);
}

.asset-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.asset-form-grid input,
.asset-form-grid select {
    margin-top: 6px;
}

.asset-inline-input {
    width: 150px;
    min-width: 130px;
    height: 36px;
    margin: 0;
    padding: 0 9px;
    border: 1px solid #d8d4dc;
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    font-size: 12px;
}

.asset-name-input {
    width: 110px;
    min-width: 100px;
}

.asset-inline-input:focus {
    border-color: var(--brand);
    outline: 2px solid rgba(142, 67, 184, .12);
}

.enterprise-form-actions {
    justify-content: flex-end;
    margin-top: 15px;
}

.icon-square {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid #dedee3;
    border-radius: 6px;
    color: #5b5e66;
    background: #fff;
}

.ranking-row {
    grid-template-columns: 34px minmax(0, 1.4fr) repeat(3, minmax(90px, .6fr));
    padding: 11px 8px;
}

.ranking-index {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 6px;
    color: #fff;
    background: #7d4ba2;
    font-size: 11px;
    font-weight: 800;
}

.status-dot-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.status-dot-label::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c28b34;
    content: "";
}

.status-dot-label.success::before { background: var(--success); }
.status-dot-label.danger::before { background: var(--danger); }
.status-dot-label.muted::before { background: #9699a2; }

.performance-threshold-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e4e4e8;
    border-radius: 6px;
    background: #f8f8fa;
}

.performance-threshold-form label,
.contract-generator-form label,
.commission-policy-form label,
.commission-tier-edit-row label {
    min-width: 0;
    color: #61646c;
    font-size: 11px;
    font-weight: 700;
}

.performance-threshold-form input,
.contract-generator-form input,
.contract-generator-form select,
.contract-generator-form textarea,
.commission-policy-form input,
.commission-policy-form select,
.commission-tier-edit-row input {
    margin-top: 6px;
}

.performance-threshold-form button {
    min-height: 42px;
    white-space: nowrap;
}

.contract-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.contract-template-item {
    display: flex;
    min-width: 0;
    min-height: 174px;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dedfe4;
    border-top: 3px solid #3375b8;
    border-radius: 6px;
    background: #fff;
}

.contract-template-item:nth-child(2) { border-top-color: #168654; }
.contract-template-item:nth-child(3) { border-top-color: #c48725; }
.contract-template-item:nth-child(4) { border-top-color: #8c4bb0; }
.server-workflow-board { margin: 0 0 24px; padding: 16px 0; border-bottom: 1px solid #ddd; }
.workflow-warning { padding: 10px; color: #774f00; background: #fff4d6; font-size: 14px; }
.workflow-order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #ddd; min-width: 0; }
.workflow-order-row > div { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.workflow-order-row button { flex-shrink: 0; }
#serverWorkflowDialog { width: min(700px, calc(100% - 24px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 0; overflow: hidden; border: 1px solid #ddd; border-radius: 8px; color: #222; }
#serverWorkflowDialog[open] { display: flex; flex-direction: column; }
.workflow-dialog-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #ddd; }
.workflow-dialog-footer { flex: 0 0 auto; padding: 10px 16px; background: #fff; border-top: 1px solid #ddd; }
#serverWorkflowDialog::backdrop { background: #0007; }
.workflow-close { position: static; flex: 0 0 44px; width: 44px; height: 44px; color: #333; background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; }
.workflow-dialog-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; overflow-wrap: anywhere; }
.workflow-dialog-content h2 { font-size: 20px; padding-right: 44px; }
.workflow-dialog-content h3 { font-size: 16px; }
.workflow-dialog-content button.primary, .workflow-dialog-content button.secondary { padding: 0 14px; }
.workflow-dialog-content form > button { width: 100%; }
.workflow-dialog-content [role="status"] { color: #9a3023; }
.workflow-dialog-content pre { white-space: pre-wrap; font: inherit; }
.workflow-dialog-content label { display: grid; gap: 6px; margin: 12px 0; }
.workflow-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.workflow-dialog-content li { margin-bottom: 12px; }
.contract-template-item p, .contract-template-item small { overflow-wrap: anywhere; }
.contract-template-item button:disabled { opacity: .5; cursor: not-allowed; }

.contract-template-item h3,
.contract-template-item p,
.contract-template-item span {
    margin: 0;
}

.contract-template-item > div > span {
    color: #767983;
    font-size: 10px;
    font-weight: 800;
}

.contract-template-item h3 {
    margin-top: 5px;
    font-size: 15px;
}

.contract-template-item p {
    margin-top: 7px;
    color: #747780;
    font-size: 11px;
    line-height: 1.55;
}

.table-action.primary-action {
    border-color: #3375b8;
    color: #255f99;
    background: #f4f8fc;
}

.table-action svg {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 4px;
    vertical-align: -2px;
}

.contract-generator-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
    padding: 15px;
    border: 1px solid #cfd9e5;
    border-left: 4px solid #3375b8;
    border-radius: 6px;
    background: #f8fbfe;
}

.contract-generator-form[hidden] {
    display: none;
}

.contract-generator-form .full-span {
    grid-column: 1 / -1;
}

.commission-policy-layout {
    display: grid;
    grid-template-columns: minmax(250px, .7fr) minmax(520px, 1.3fr);
    align-items: start;
    gap: 16px;
}

.commission-policy-list {
    display: grid;
    gap: 7px;
}

.commission-policy-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #e0e1e5;
    border-radius: 6px;
    color: #30323a;
    background: #fff;
    text-align: left;
}

.commission-policy-item.active {
    border-color: #3375b8;
    background: #f4f8fc;
    box-shadow: inset 3px 0 0 #3375b8;
}

.commission-policy-item span,
.commission-policy-item strong,
.commission-policy-item small {
    display: block;
    min-width: 0;
}

.commission-policy-item strong {
    font-size: 12px;
}

.commission-policy-item small {
    margin-top: 3px;
    color: #7b7e87;
    font-size: 10px;
}

.commission-policy-item > span:last-child {
    text-align: right;
}

.commission-policy-form {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e0e1e5;
    border-radius: 6px;
    background: #fafafa;
}

.commission-tier-editor {
    display: grid;
    gap: 7px;
    margin: 12px 0;
}

.commission-tier-edit-row {
    display: grid;
    grid-template-columns: 60px repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e4e4e8;
    border-radius: 6px;
    background: #fff;
}

.commission-tier-edit-row > span {
    align-self: center;
    color: #565962;
    font-size: 11px;
    font-weight: 800;
}

.commission-tier-edit-row label:last-child {
    position: relative;
}

.commission-tier-edit-row label:last-child span {
    position: absolute;
    right: 10px;
    bottom: 13px;
    color: #777a84;
}

.commission-tier-edit-row label:last-child input {
    padding-right: 28px;
}

.commission-policy-scope {
    padding: 9px 13px;
    color: #5d626b;
    background: #f4f7fa;
    font-size: 11px;
}

.profile-summary,
.profile-activity {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.profile-activity {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-summary > div,
.profile-activity > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e2e3e8;
    border-radius: 6px;
    background: #f8f8fa;
}

.profile-summary span,
.profile-summary strong,
.profile-summary small,
.profile-activity span,
.profile-activity strong,
.profile-activity small {
    display: block;
}

.profile-summary span,
.profile-activity span {
    color: #777a84;
    font-size: 10px;
}

.profile-summary strong,
.profile-activity strong {
    margin-top: 6px;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.profile-summary small,
.profile-activity small {
    margin-top: 4px;
    color: #777a84;
    font-size: 10px;
    line-height: 1.4;
}

.profile-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #b8dfc9;
    border-radius: 6px;
    color: #246c4b;
    background: #f0faf5;
}

.profile-warning.has-warning {
    border-color: #efc7c7;
    color: #a23b3b;
    background: #fff5f5;
}

.profile-warning strong {
    flex: 0 0 auto;
}

.profile-warning span {
    font-size: 11px;
    line-height: 1.5;
}

.dealer-alert-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dealer-alert-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #ead7b5;
    border-radius: 6px;
    color: #4d3b20;
    background: #fffaf1;
    text-align: left;
}

.dealer-alert-item.danger {
    border-color: #ecc5c5;
    color: #863737;
    background: #fff5f5;
}

.dealer-alert-item > svg:first-child {
    width: 18px;
    height: 18px;
}

.dealer-alert-item > svg:last-child {
    width: 14px;
    height: 14px;
    color: #8b8d95;
}

.dealer-alert-item strong,
.dealer-alert-item span,
.dealer-alert-item small {
    display: block;
    min-width: 0;
}

.dealer-alert-item strong {
    font-size: 12px;
}

.dealer-alert-item span,
.dealer-alert-item small {
    margin-top: 3px;
    color: #767983;
    font-size: 10px;
    line-height: 1.4;
}

.dealer-alert-item > small {
    white-space: nowrap;
}

.empty-enterprise-state {
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px dashed #dfe0e4;
    color: #7b7e87;
    background: #fafafa;
    font-size: 12px;
    text-align: center;
}

.profile-order-list {
    display: grid;
    gap: 7px;
}

.profile-order-list > strong {
    font-size: 12px;
}

.profile-order-list > button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 9px 11px;
    border: 1px solid #e2e3e8;
    border-radius: 6px;
    color: #34363d;
    background: #fafafa;
    text-align: left;
}

.profile-order-list > button > div {
    min-width: 0;
}

.profile-order-list span,
.profile-order-list small {
    display: block;
}

.profile-order-list span {
    font-size: 11px;
    font-weight: 700;
}

.profile-order-list small {
    margin-top: 3px;
    color: #777a84;
    font-size: 10px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.profile-order-list svg {
    width: 14px;
    height: 14px;
}

.profile-order-list p {
    margin: 0;
    color: #777a84;
    font-size: 11px;
}

.order-journey-dialog {
    width: min(920px, 100%);
}

.journey-summary,
.journey-contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.journey-summary > div,
.journey-contact-grid > div {
    min-width: 0;
    padding: 11px;
    border: 1px solid #e2e3e8;
    border-radius: 6px;
    background: #f8f8fa;
}

.journey-summary span,
.journey-summary strong,
.journey-summary small,
.journey-contact-grid span,
.journey-contact-grid strong,
.journey-contact-grid small {
    display: block;
    overflow-wrap: anywhere;
}

.journey-summary span,
.journey-contact-grid span {
    color: #777a84;
    font-size: 10px;
}

.journey-summary strong,
.journey-contact-grid strong {
    margin-top: 5px;
    font-size: 13px;
}

.journey-summary small,
.journey-contact-grid small {
    margin-top: 4px;
    color: #777a84;
    font-size: 10px;
    line-height: 1.45;
}

.journey-blocker {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #ecc5c5;
    border-left: 4px solid var(--danger);
    border-radius: 6px;
    color: #913b3b;
    background: #fff5f5;
}

.journey-blocker.complete {
    border-color: #b8dfc9;
    border-left-color: var(--success);
    color: #246c4b;
    background: #f0faf5;
}

.journey-blocker.risk {
    border-color: #efb2bb;
    border-left-color: #c22f47;
    color: #9c2438;
    background: #fff1f3;
}

.journey-blocker > svg {
    width: 24px;
    height: 24px;
}

.journey-blocker span,
.journey-blocker strong,
.journey-blocker small {
    display: block;
}

.journey-blocker span,
.journey-blocker small {
    font-size: 10px;
}

.journey-blocker strong {
    margin-top: 3px;
    font-size: 15px;
}

.journey-blocker small {
    margin-top: 4px;
    color: #777a84;
    line-height: 1.45;
}

.journey-next-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    padding: 14px;
    border: 1px solid #d9bce5;
    border-left: 4px solid var(--brand);
    border-radius: 6px;
    background: #fbf7fc;
}

.journey-next-copy span,
.journey-next-copy strong,
.journey-next-copy small {
    display: block;
    overflow-wrap: anywhere;
}

.journey-next-copy span {
    color: var(--brand);
    font-size: 10px;
    font-weight: 800;
}

.journey-next-copy strong {
    margin-top: 4px;
    font-size: 15px;
}

.journey-next-copy small {
    margin-top: 5px;
    color: #66616b;
    font-size: 11px;
    line-height: 1.55;
}

.journey-next-action > button {
    width: 100%;
    min-width: 0;
}

.order-journey-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.journey-stage {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    min-width: 0;
    min-height: 98px;
    padding: 10px;
    border: 1px solid #e2e3e8;
    border-radius: 6px;
    background: #fafafa;
}

.journey-stage.done {
    border-color: #cbe4d6;
    background: #f4faf7;
}

.journey-stage.current {
    border-color: #e0c58f;
    background: #fffaf0;
    box-shadow: inset 3px 0 0 #c48725;
}

.journey-stage-icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    color: #8b8d95;
    background: #e8e9ed;
}

.journey-stage.done .journey-stage-icon {
    color: #fff;
    background: var(--success);
}

.journey-stage.current .journey-stage-icon {
    color: #fff;
    background: #c48725;
}

.journey-stage.risk {
    border-color: #efb2bb;
    background: #fff1f3;
    box-shadow: inset 3px 0 0 #c22f47;
}

.journey-stage.risk .journey-stage-icon {
    color: #fff;
    background: #c22f47;
}

.journey-stage-icon svg {
    width: 13px;
    height: 13px;
}

.journey-stage strong,
.journey-stage div > span,
.journey-stage small {
    display: block;
    overflow-wrap: anywhere;
}

.journey-stage strong {
    font-size: 11px;
}

.journey-stage div > span,
.journey-stage small {
    margin-top: 4px;
    color: #777a84;
    font-size: 10px;
    line-height: 1.4;
}

.journey-contact-grid {
    grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr);
    margin-bottom: 14px;
}

.hq-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(17, 15, 19, .58);
}

.hq-edit-modal[hidden] {
    display: none;
}

.hq-edit-dialog {
    width: min(720px, 100%);
    max-height: min(820px, calc(100vh - 36px));
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #dedbe2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(20, 16, 23, .26);
}

.hq-edit-head,
.hq-edit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hq-edit-head {
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.hq-edit-head span,
.hq-edit-head h2 {
    display: block;
    margin: 0;
}

.hq-edit-head span {
    color: var(--muted);
    font-size: 11px;
}

.hq-edit-head h2 {
    margin-top: 4px;
    font-size: 20px;
}

.hq-edit-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 14px;
}

.hq-edit-fields .full-span {
    grid-column: 1 / -1;
}

.hq-permission-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hq-permission-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #faf9fb;
    font-size: 12px;
}

.hq-permission-option input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0;
}

.hq-edit-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.hq-edit-actions button {
    min-width: 108px;
}

.compact-toolbar {
    justify-content: flex-start;
    margin-bottom: 12px;
}

.compact-toolbar .enterprise-search {
    max-width: 420px;
}

.enterprise-table tr.is-redline,
.enterprise-table tr.is-negative-review {
    background: #fff7f7;
}

.enterprise-table tr.is-redline:hover,
.enterprise-table tr.is-negative-review:hover {
    background: #fff0f1;
}

.attention-reason,
.evaluation-comment {
    min-width: 190px;
    line-height: 1.5;
}

.review-score {
    color: var(--success);
}

.review-score.negative {
    color: var(--danger);
}

.copy-address-button {
    display: grid;
    width: 100%;
    min-width: 220px;
    grid-template-columns: minmax(0, 1fr) 16px;
    align-items: start;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid #dedfe5;
    border-radius: 5px;
    color: #393b42;
    background: #fafafa;
    text-align: left;
    line-height: 1.5;
}

.copy-address-button svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: var(--brand);
}

.factory-priority-row {
    box-shadow: inset 3px 0 0 #c48725;
}

.factory-history-panel {
    border-top-color: #d7d8de;
    background: #fbfbfc;
}

.command-center-view {
    padding: 0 !important;
    background: #0d0f13 !important;
}

.app-shell.command-center-active .summary-strip {
    display: none;
}

.command-center-shell {
    min-height: calc(100vh - 74px);
    padding: 22px;
    color: #f5f6f8;
    background: #0d0f13;
}

.command-center-head,
.command-brand,
.command-center-actions,
.command-panel-head,
.command-live-list article,
.command-alert-list article,
.command-region-ranking > div,
.command-center-footer {
    display: flex;
    align-items: center;
}

.command-center-head,
.command-panel-head,
.command-center-footer {
    justify-content: space-between;
}

.command-center-head {
    min-height: 62px;
    padding: 0 2px 16px;
    border-bottom: 1px solid #2a2d35;
}

.command-brand {
    gap: 12px;
}

.command-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border: 1px solid #37313e;
    border-radius: 7px;
    background-color: #000;
    background-image: url("./micowey-logo.jpeg");
    background-repeat: no-repeat;
    background-position: -23px -42px;
    background-size: 205px 144px;
}

.command-brand span,
.command-brand h2 {
    display: block;
    margin: 0;
}

.command-brand > div > span {
    color: #c88be6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.command-brand h2 {
    margin-top: 3px;
    font-size: 23px;
    letter-spacing: 0;
}

.command-center-actions {
    gap: 10px;
    color: #aeb2bd;
    font-size: 12px;
}

.command-center-actions button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #3d3a44;
    border-radius: 6px;
    color: #fff;
    background: #1b1d23;
}

.command-center-actions svg {
    width: 15px;
    height: 15px;
}

.command-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.command-kpi {
    min-width: 0;
    min-height: 104px;
    padding: 14px;
    border: 1px solid #2b2e36;
    border-top: 3px solid #9659bd;
    border-radius: 6px;
    background: #17191f;
}

.command-kpi.green { border-top-color: #28a672; }
.command-kpi.gold { border-top-color: #d49a3e; }
.command-kpi.cyan { border-top-color: #3695a8; }
.command-kpi.red { border-top-color: #db5264; }

.command-kpi span,
.command-kpi strong,
.command-kpi small {
    display: block;
}

.command-kpi span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #aeb2bd;
    font-size: 11px;
}

.command-kpi span svg {
    width: 14px;
    height: 14px;
}

.command-kpi strong {
    margin-top: 8px;
    font-size: 25px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.command-kpi small {
    margin-top: 7px;
    color: #858a95;
    font-size: 10px;
}

.command-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, .65fr);
    gap: 12px;
}

.command-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid #2b2e36;
    border-radius: 6px;
    background: #15171c;
}

.command-panel-head {
    gap: 12px;
    margin-bottom: 10px;
}

.command-panel-head span,
.command-panel-head strong,
.command-panel-head small {
    display: block;
}

.command-panel-head span,
.command-panel-head small {
    color: #868b96;
    font-size: 10px;
}

.command-panel-head strong {
    margin-top: 3px;
    font-size: 15px;
}

.command-map {
    min-height: 500px;
}

.command-map svg {
    display: block;
    width: 100%;
    height: 500px;
}

.command-map-province {
    fill: #1d3042;
    stroke: #547493;
    stroke-width: .8;
    vector-effect: non-scaling-stroke;
    transition: fill .16s ease, stroke .16s ease;
}

.command-map-province:hover {
    fill: #294b62;
    stroke: #8eb3d2;
}

.command-map-province.boundary-feature {
    fill: rgba(0, 0, 0, 0);
    stroke: #71869a;
    stroke-dasharray: 3 3;
}

.command-map-inset {
    fill: rgba(14, 28, 40, .72);
    stroke: #3e566c;
    stroke-width: 1;
}

.command-map-inset-label {
    fill: #8ea0b0;
    font-size: 9px;
    letter-spacing: 0;
}

.command-map-marker circle:not(.pulse) {
    fill: #d6a3ee;
    stroke: #fff;
    stroke-width: 2;
}

.command-map-marker .pulse {
    fill: rgba(150, 89, 189, .22);
    animation: command-map-pulse 2.4s ease-out infinite;
}

.command-map-marker text {
    fill: #fff;
    font-size: 12px;
    font-weight: 700;
}

.command-map-marker text.value {
    fill: #c2c9d1;
    font-size: 8px;
    font-weight: 500;
}

.command-map-loading {
    display: grid;
    min-height: 500px;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #8e939e;
    font-size: 12px;
}

.command-map-loading svg {
    width: 28px;
    height: 28px;
    color: #8f58b4;
}

.command-map-loading.error {
    color: #d77c88;
}

@keyframes command-map-pulse {
    0% { opacity: .75; transform: scale(.55); }
    75%, 100% { opacity: 0; transform: scale(1.25); }
}

.command-region-ranking {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.command-region-ranking > div {
    min-width: 0;
    gap: 7px;
    padding: 8px;
    border: 1px solid #2c2f37;
    border-radius: 5px;
    background: #1b1d23;
}

.command-region-ranking span {
    color: #c88be6;
    font-size: 12px;
    font-weight: 800;
}

.command-region-ranking strong {
    font-size: 11px;
}

.command-region-ranking small {
    min-width: 0;
    margin-left: auto;
    color: #8e939e;
    font-size: 9px;
    text-align: right;
}

.command-side-stack {
    display: grid;
    gap: 12px;
}

.command-live-list,
.command-alert-list {
    display: grid;
    gap: 7px;
}

.command-live-list article,
.command-alert-list article {
    min-width: 0;
    gap: 9px;
    padding: 10px;
    border: 1px solid #2c2f37;
    border-radius: 5px;
    background: #1b1d23;
}

.command-live-list article > span,
.command-alert-list article > span {
    display: inline-grid;
    min-width: 42px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0 7px;
    border-radius: 4px;
    color: #e3c7f1;
    background: #352440;
    font-size: 10px;
    font-weight: 700;
}

.command-live-list article > div,
.command-alert-list article > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.command-live-list strong,
.command-alert-list strong {
    font-size: 11px;
}

.command-live-list small,
.command-alert-list small {
    color: #9095a0;
    font-size: 9px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.command-live-list b {
    margin-left: auto;
    color: #69c99a;
    font-size: 12px;
    white-space: nowrap;
}

.command-alert-list article.red > span { color: #ffd9de; background: #52242b; }
.command-alert-list article.gold > span { color: #ffe4b7; background: #4c3820; }
.command-alert-list article.violet > span { color: #e3c7f1; background: #352440; }

.command-center-footer {
    gap: 12px;
    margin-top: 12px;
    padding: 10px 2px 0;
    border-top: 1px solid #252830;
    color: #727782;
    font-size: 9px;
}

#view-commandCenter:fullscreen {
    overflow: auto;
    background: #0d0f13;
}

#view-commandCenter:fullscreen .command-center-shell {
    min-height: 100vh;
}

@media (min-width: 960px) {
    body {
        background: #f2f2f5;
    }

    .app-shell {
        display: grid;
        width: min(100%, 1600px);
        grid-template-rows: 74px auto minmax(calc(100vh - 190px), auto);
        grid-template-columns: 232px minmax(0, 1fr);
        margin: 0 auto;
        background: #f5f5f8;
        box-shadow: none;
    }

    .app-header {
        position: sticky;
        top: 0;
        z-index: 20;
        grid-row: 1;
        grid-column: 1 / -1;
        padding: 14px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .brand-lockup h1 {
        font-size: 18px;
    }

    .role-button {
        min-width: 132px;
        justify-content: center;
    }

    .summary-strip {
        grid-row: 2;
        grid-column: 2;
        gap: 12px;
        padding: 18px 24px 4px;
        background: #f5f5f8;
    }

    .summary-strip div {
        min-height: 82px;
        padding: 14px 16px;
        border-top: 3px solid #c8a7db;
        background: #fff;
        text-align: left;
    }

    .summary-strip div:nth-child(2) {
        border-top-color: #58b592;
    }

    .summary-strip div:nth-child(3) {
        border-top-color: #df729b;
    }

    .summary-strip div:nth-child(4) {
        border-top-color: #d49a4a;
    }

    .summary-strip span {
        font-size: 12px;
    }

    .summary-strip strong {
        margin-top: 7px;
        font-size: 25px;
    }

    .top-tabs {
        position: sticky;
        top: 74px;
        z-index: 10;
        display: flex;
        height: calc(100vh - 74px);
        grid-row: 2 / 4;
        grid-column: 1;
        align-self: start;
        flex-direction: column;
        gap: 5px;
        padding: 20px 14px 16px;
        overflow-y: auto;
        border: 0;
        border-right: 1px solid var(--line);
        background: #fff;
    }

    .top-tabs button {
        min-height: 44px;
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 12px;
        font-size: 13px;
        text-align: left;
    }

    .top-tabs button svg {
        flex: 0 0 auto;
    }

    .top-tabs .active {
        color: #67317e;
        background: #f1e6f6;
        box-shadow: inset 3px 0 0 var(--brand);
    }

    .desktop-only,
    .top-tabs .desktop-only {
        display: flex;
    }

    .desktop-nav-head {
        display: grid;
        gap: 3px;
        margin: 0 8px 10px;
    }

    .desktop-nav-head span {
        color: var(--ink);
        font-size: 15px;
        font-weight: 800;
    }

    .desktop-nav-head small,
    .desktop-nav-footer small {
        color: var(--muted);
        font-size: 11px;
    }

    .desktop-nav-label {
        margin: 15px 10px 3px;
        color: #918898;
        font-size: 11px;
        font-weight: 700;
    }

    .desktop-nav-footer {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-top: auto;
        padding: 12px 10px 0;
        border-top: 1px solid var(--line);
    }

    .desktop-nav-footer div {
        display: grid;
        min-width: 0;
        gap: 2px;
    }

    .desktop-nav-footer strong {
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    .presence-dot {
        width: 9px;
        height: 9px;
        flex: 0 0 auto;
        border-radius: 50%;
        background: var(--success);
        box-shadow: 0 0 0 4px #e8f5ee;
    }

    .view {
        min-width: 0;
        grid-row: 3;
        grid-column: 2;
        padding: 20px 24px 42px;
        background: #f5f5f8;
    }

    .app-shell.command-center-active #view-commandCenter.active {
        grid-row: 2 / 4;
    }

    .view > .section-title:first-child,
    .dashboard-heading {
        margin-top: 0;
    }

    #view-lead.active {
        display: grid;
        grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr);
        align-items: start;
        gap: 0 20px;
    }

    #view-lead > .assistant-panel {
        position: sticky;
        top: 94px;
        grid-row: 1 / 3;
        grid-column: 1;
    }

    #view-lead > .section-title,
    #view-lead > .form-card {
        grid-column: 2;
    }

    #view-lead > .section-title {
        margin-top: 0;
    }

    .dashboard-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .metric-card {
        min-height: 100px;
        background: #fff;
    }

    .customer-stage-tabs {
        max-width: 720px;
    }

    .customer-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .device-list,
    .order-list,
    .notice-log.full,
    .approval-list,
    .permission-matrix {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .demo-device-availability-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-tabs {
        width: min(720px, 100%);
    }

    .order-panel.active > .form-card,
    #view-duplicate > .search-bar,
    #view-duplicate > #duplicateResult,
    #view-follow > #followWorkspace,
    #view-permissions > .form-card {
        max-width: 1120px;
    }

    .form-card {
        padding: 18px;
    }

    .dispatch-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .dispatch-board > .work-order,
    .dispatch-board > .section-title,
    .dispatch-board > .staff-list,
    .dispatch-board > [data-permission-key="demoServiceCompletion"] {
        grid-column: 1 / -1;
    }

    .dispatch-board > .notice-log {
        align-self: stretch;
    }
}

@media (min-width: 1280px) {
    #factoryKpiGrid,
    #serviceKpiGrid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 960px) and (max-width: 1279px) {
    .app-shell {
        grid-template-columns: 218px minmax(0, 1fr);
    }

    .enterprise-kpi-grid,
    .enterprise-kpi-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .enterprise-two-column {
        grid-template-columns: 1fr;
    }

    .pipeline-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .asset-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 959px) {
    .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px 14px;
    }

    .summary-strip div {
        display: grid;
        min-height: 72px;
        align-content: center;
        padding: 10px 12px;
    }

    .summary-strip strong {
        font-size: 17px;
    }

    .enterprise-page-head,
    .enterprise-toolbar,
    .enterprise-head-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .enterprise-kpi-grid,
    .enterprise-kpi-grid.compact,
    .enterprise-two-column,
    .asset-form-grid,
    .pipeline-board,
    .hq-edit-fields,
    .hq-permission-list {
        grid-template-columns: 1fr;
    }

    .enterprise-toolbar select,
    .enterprise-search {
        width: 100%;
    }

    .demo-order-alert {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .demo-order-alert > .status-pill {
        grid-column: 2;
        justify-self: start;
    }

    .performance-threshold-form,
    .contract-generator-form,
    .profile-summary,
    .profile-activity,
    .journey-summary,
    .order-journey-timeline,
    .dealer-alert-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .performance-threshold-form button,
    .contract-generator-form .full-span,
    .profile-warning {
        grid-column: 1 / -1;
    }

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

    .commission-policy-layout {
        grid-template-columns: 1fr;
    }

    .command-center-shell {
        min-height: 100vh;
        padding: 14px;
    }

    .command-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-main-grid {
        grid-template-columns: 1fr;
    }

    .command-region-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .top-tabs {
        grid-template-columns: repeat(var(--mobile-nav-count), minmax(66px, 1fr));
        gap: 2px;
        padding: 5px 4px;
    }

    .top-tabs button {
        min-height: 58px;
        flex-direction: column;
        gap: 3px;
        padding: 5px 2px;
        line-height: 1.15;
    }

    .top-tabs button span {
        white-space: nowrap;
    }

    .command-center-head,
    .command-center-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .command-center-actions {
        width: 100%;
        justify-content: space-between;
    }

    .command-brand h2 {
        font-size: 18px;
    }

    .command-kpi-grid,
    .command-region-ranking {
        grid-template-columns: 1fr;
    }

    .command-map,
    .command-map svg {
        min-height: 320px;
        height: 320px;
    }

    .performance-threshold-form,
    .contract-generator-form,
    .profile-summary,
    .profile-activity,
    .journey-summary,
    .journey-contact-grid,
    .order-journey-timeline,
    .dealer-alert-list,
    .commission-tier-edit-row {
        grid-template-columns: 1fr;
    }

    .journey-next-action {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dealer-alert-item {
        grid-template-columns: 30px minmax(0, 1fr) 16px;
    }

    .dealer-alert-item > small {
        display: none;
    }

    .commission-tier-edit-row > span {
        margin-bottom: 2px;
    }

    .profile-warning {
        align-items: flex-start;
        flex-direction: column;
    }

    .notice-item {
        grid-template-columns: 8px minmax(0, 1fr);
    }

    .notice-open-label {
        grid-column: 2;
        justify-self: start;
    }

    .notice-center-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .notice-center-actions button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .server-connection-button {
        display: none;
    }

    .location-input-row {
        grid-template-columns: 1fr;
    }

    .location-action-buttons button {
        flex: 1;
    }

    .role-button {
        width: 42px;
        padding: 0;
        justify-content: center;
    }

    .role-button span {
        display: none;
    }

    .brand-lockup h1 {
        font-size: 17px;
    }

    .approval-actions {
        grid-template-columns: 1fr 1fr;
    }

    .approval-actions select {
        grid-column: 1 / -1;
    }

    .staff-card {
        align-items: flex-start;
    }

    .staff-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .service-contact-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .service-contact-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .service-contact-actions .icon-text-button {
        min-width: 148px;
    }

    .demo-rule-grid,
    .demo-duration-preview {
        grid-template-columns: 1fr;
    }

    .demo-order-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-device-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-qr-panel {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .payment-qr-button {
        width: 78px;
        height: 78px;
    }

    .action-grid,
    .two-col,
    .button-row,
    .customer-actions,
    .order-meta {
        grid-template-columns: 1fr;
    }

    .customer-result-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .follow-search-item,
    .selected-customer-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .follow-search-item button,
    .selected-customer-bar button {
        width: 100%;
    }

    .work-order {
        display: grid;
    }

    .search-bar {
        grid-template-columns: minmax(0, 1fr) 48px;
    }

    .search-bar button {
        min-width: 48px;
        padding: 0;
    }

    .search-bar button span {
        display: none;
    }
}
.installment-ledger-scroll { max-width: 100%; max-height: 320px; overflow: auto; }
.installment-ledger-scroll table { width: 100%; border-collapse: collapse; }
.installment-ledger-scroll th, .installment-ledger-scroll td { padding: 8px; text-align: left; border-bottom: 1px solid #e4e0e8; white-space: nowrap; }
