/* Base typography, body styling, layout-content positioning, and the
   top-navigation chrome are now governed by design-system.css. The rules
   below intentionally narrow scope to component-specific tweaks so the
   design tokens remain authoritative. */

.layout-content {
    flex: 1 1 auto;
}

body.authBody {
    text-align: center;
}

body.authBody {
    background: var(--ds-color-surface-muted);
    min-height: 100vh;
}

body.authBody .card {
    border-radius: var(--ds-radius-md);
    border: 1px solid var(--ds-color-border-strong);
    background: var(--ds-color-bg);
    /* Stronger elevation than in-app cards because the auth card is the
       sole focal point on its page. */
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    display: flex;
    padding: var(--ds-space-xl);
    align-items: center;
}

body.authBody .ui-inputfield {
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-color-border-strong);
    background: var(--ds-color-bg);
    box-shadow: 0 1px 2px 0 rgba(18, 18, 23, 0.05);
    display: flex;
    padding: 7px 10.5px;
    align-items: center;
    gap: 10.5px;
    align-self: stretch;
}


body.authBody .ui-inputfield:focus {
    border-color: var(--ds-color-primary);
    outline: 0 none;
    box-shadow: inset 0 0 0 .15rem rgba(48, 84, 118, 0.18);
}

body.authBody .ui-inputfield:hover {
    border-color: var(--ds-color-primary);
}

body.authBody .ui-password {
    position: relative;
    display: inline-block;
}

body.authBody .ui-password .ui-password-icon,
body.authBody .ui-password .ui-password-show-icon,
body.authBody .ui-password .ui-password-hide-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 3;
    cursor: pointer !important;
    pointer-events: auto !important;
}

body.authBody .ui-button {
    border-radius: var(--ds-radius-md);
    border: 1px solid var(--ds-color-primary);
    background: var(--ds-color-primary);
    display: flex;
    padding: 7px 10.5px;
    justify-content: center;
    align-items: center;
    gap: 7px;
    align-self: stretch;
    transition: background var(--ds-dur-base) var(--ds-ease-default), opacity var(--ds-dur-base) var(--ds-ease-default);
}

body.authBody .ui-button:hover {
    border: 1px solid var(--ds-color-primary-hover);
    background: var(--ds-color-primary-hover);
    opacity: 1;
}

body.authBody .ui-button .ui-button-text {
    color: var(--ds-color-text-on-primary);
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-semibold);
    line-height: normal;
}

body.authBody .ui-link {
    color: var(--ds-color-primary);
    transition: color var(--ds-dur-fast) var(--ds-ease-default), opacity var(--ds-dur-fast) var(--ds-ease-default);
}

body.authBody .ui-link:hover {
    color: var(--ds-color-accent);
    text-decoration: underline;
}

#dtTipxColTog {
    min-width: 150px;
    min-height: 300px;
}

#layout-config-button {
    top: 110px;
}

body .ui-autocomplete-panel .ui-autocomplete-items .ui-autocomplete-item.ui-autocomplete-row>td {
    padding: 0.5rem 0.5rem;
}

button .ui-button {
    margin-right: .5rem;
}

.ql-indent-1 {
    margin-left: 2.5rem;
}

.ql-indent-2 {
    margin-left: 4rem;
}

.ql-indent-3 {
    margin-left: 5.5rem;
}

.ql-indent-4 {
    margin-left: 7rem;
}

.ql-indent-5 {
    margin-left: 8.5rem;
}

.ql-indent-6 {
    margin-left: 9rem;
}

body .ui-fluid .ui-autocomplete-multiple-container.ui-autocomplete-dd-multiple-container {
    width: calc(100% - 3rem);
}

body .ui-fluid .ui-autocomplete .ui-autocomplete-input.ui-autocomplete-dd-input {
    width: calc(100% - 3rem);
}

body .ui-autocomplete-input-token input {
    width: 1000px;
}

.hashtag-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hashtag-badge {
    padding: var(--chip-padding-y, 4px) var(--chip-padding-x, 10px);
    align-items: center;
    gap: var(--chip-gap, 6px);
    border-radius: var(--chip-border-radius, var(--ds-radius-md));
    background: var(--chip-background, var(--ds-color-surface));
    color: var(--chip-color, var(--ds-color-text-strong));
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-medium);
    line-height: normal;
}

.hashtag-inplace {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--ds-space-xs) var(--ds-space-12);
    gap: var(--ds-space-sm);
    border-radius: var(--ds-radius-md);
    border: 1px solid var(--ds-color-border-strong);
    background: var(--ds-color-bg);
    color: var(--ds-color-text-secondary);
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-medium);
    text-align: center;
    line-height: 20px;
}

.hashtag-inplace .ui-inplace-display {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.hashtag-inplace .ui-inplace-display:hover {
    background: var(--chip-background, var(--ds-color-surface));
}

.hashtag-add-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--ds-radius-md);
    padding: 2px 8px;
    text-transform: uppercase;
    font-family: var(--ds-font-sans);
    font-weight: var(--ds-font-weight-semibold);
    font-size: 12px;
    letter-spacing: 0;
    line-height: 1.5;
}

.customer-badge.status-qualified {
    background: var(--ds-color-success-bg);
    color: var(--ds-color-success-text);
}

.customer-badge.status-unqualified {
    background: var(--ds-color-danger-bg);
    color: var(--ds-color-danger-text);
}

.customer-badge.status-negotiation {
    background: var(--ds-color-warning-bg);
    color: var(--ds-color-warning-text);
}

.customer-badge.status-new {
    background: var(--ds-color-info-bg);
    color: var(--ds-color-info-text);
}

.customer-badge.status-renewal {
    background: #f3e8ff;
    color: #6b21a8;
}

.customer-badge.status-proposal {
    background: #fff1e6;
    color: #9a3f0c;
}

body .ui-datatable thead th {
    text-align: center;
    vertical-align: bottom;
}

#formCalendar .fc .fc-daygrid-day.fc-day-today, #formCalendar .fc .fc-timegrid-col.fc-day-today {
    background-color: #e3f2fd;
}

#titleRobotChart {
    margin-top: 20px;
    background: #173653;
    color: white;
    padding: 15px 10px;
    text-align: center;
    border-radius: 8px;
    position: relative;
}

#titleDexChart {
    margin-top: 20px;
    background: #173653;
    color: white;
    padding: 15px 10px;
    text-align: center;
    border-radius: 8px;
    position: relative;
}

/* View mode – read-only input visual */
.view-mode .ui-inputfield,
.view-mode .ui-inputtextarea,
.view-mode .ui-selectonemenu-label {
    background-color: var(--ds-color-surface) !important;
    border-color: var(--ds-color-border) !important;
    color: var(--ds-color-text-primary);
    cursor: default;
}

.view-mode .ui-inputfield:focus,
.view-mode .ui-inputtextarea:focus {
    box-shadow: none !important;
    border-color: var(--ds-color-border) !important;
}


.pb-dark .ui-progressbar-label {
    color: black !important;
}

.pb-light .ui-progressbar-label {
    color: white !important;
}

body .ui-button {
    border-radius: var(--button-border-radius, var(--ds-radius-md));
    border: 1px solid var(--button-primary-border-color, var(--ds-color-primary));
    background: var(--button-primary-background, var(--ds-color-primary));
}

/* Shared breadcrumb */
body .layout-main > .private-breadcrumb-slot {
    background: var(--ds-color-bg) !important;
    border-bottom: 1px solid var(--ds-color-border);
    box-sizing: border-box;
    margin: 0 !important;
    padding: 12px 0 10px 0 !important;
    width: 100%;
}

body .layout-main > .private-breadcrumb-slot > .ui-toolbar,
body .layout-main > .private-breadcrumb-slot > .ui-toolbar.ui-widget,
body .layout-main > .private-breadcrumb-slot > .ui-toolbar.ui-widget.ui-widget-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
    max-width: var(--ds-max-width-wide);
    min-height: 32px !important;
    padding: 0 var(--ds-space-lg) !important;
    margin: 0 auto !important;
    width: 100%;
}

body .layout-main > .private-breadcrumb-slot > .ui-toolbar .ui-toolbar-group-left,
body .layout-main > .private-breadcrumb-slot > .ui-toolbar .ui-toolbar-group-right,
body .layout-main > .private-breadcrumb-slot > .ui-toolbar.ui-widget .ui-toolbar-group-left,
body .layout-main > .private-breadcrumb-slot > .ui-toolbar.ui-widget .ui-toolbar-group-right {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0 !important;
}

body .custom-breadcrumb.ui-breadcrumb {
    background: transparent !important;
    border: none !important;
    border-radius: var(--ds-radius-md) !important;
    box-shadow: none !important;
    box-sizing: border-box;
    min-height: 32px;
    margin-top: 0 !important;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 !important;
    scrollbar-width: none;
    width: 100%;
}

body .custom-breadcrumb.ui-breadcrumb::-webkit-scrollbar {
    display: none;
}

body .custom-breadcrumb.ui-breadcrumb ul {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    min-width: 0;
}

body .custom-breadcrumb.ui-breadcrumb ul li {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    flex: 0 1 auto;
    min-width: 0;
}

body .custom-breadcrumb.ui-breadcrumb ul li.ui-breadcrumb-chevron {
    font-size: 12px !important;
    color: var(--ds-color-text-muted) !important;
    line-height: 1 !important;
    width: 12px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 12px !important;
}

body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link {
    background: transparent !important;
    border: none !important;
    border-radius: var(--ds-radius-sm);
    display: inline-flex !important;
    align-items: center !important;
    min-height: 32px;
    max-width: 100%;
    padding: 0 2px !important;
    text-decoration: none !important;
}

body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link:hover .ui-menuitem-text,
body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link:focus .ui-menuitem-text {
    color: var(--ds-color-primary) !important;
}

body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link .ui-menuitem-text {
    color: var(--ds-color-text-secondary) !important;
    display: inline-block;
    font-family: var(--ds-font-sans) !important;
    font-size: var(--ds-font-size-caption) !important;
    font-weight: var(--ds-font-weight-regular) !important;
    line-height: 1.2 !important;
    max-width: 34ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link[aria-current="page"] .ui-menuitem-text,
body .custom-breadcrumb.ui-breadcrumb ul li:last-child:not(.ui-breadcrumb-chevron):not(.ui-breadcrumb-options) .ui-menuitem-link .ui-menuitem-text,
body .custom-breadcrumb.ui-breadcrumb .ui-breadcrumb-items li:last-child:not(.ui-breadcrumb-chevron):not(.ui-breadcrumb-options) .ui-menuitem-link .ui-menuitem-text {
    color: var(--breadcrumb-item-color-active, var(--ds-color-primary)) !important;
    font-family: var(--ds-font-sans) !important;
    font-size: var(--ds-font-size-caption) !important;
    font-weight: var(--ds-font-weight-semibold) !important;
    line-height: 1.2 !important;
}

body .private-breadcrumb-slot > li {
    display: inline-flex;
    align-items: center;
    list-style: none;
    margin: 0 8px 0 0;
    min-height: 32px;
    padding: 0;
    vertical-align: middle;
}

body .private-breadcrumb-slot > li:first-child {
    margin-left: 0;
}

body .private-breadcrumb-slot > li,
body .private-breadcrumb-slot > li .ui-link,
body .private-breadcrumb-slot > li a {
    color: var(--breadcrumb-item-color, var(--ds-color-text-secondary));
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-regular);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

body .private-breadcrumb-slot > li:last-child,
body .private-breadcrumb-slot > li:last-child .ui-link,
body .private-breadcrumb-slot > li:last-child a {
    color: var(--breadcrumb-item-color-active, var(--ds-color-primary));
    font-weight: var(--ds-font-weight-semibold);
}

body .private-breadcrumb-slot > li .pi-chevron-right {
    color: var(--ds-color-text-muted);
    font-size: 12px;
    line-height: 1;
}

@media screen and (max-width: 980px) {
    body .layout-main > .private-breadcrumb-slot {
        padding: 10px 0 8px 0 !important;
    }

    body .layout-main > .private-breadcrumb-slot > .ui-toolbar,
    body .layout-main > .private-breadcrumb-slot > .ui-toolbar.ui-widget,
    body .layout-main > .private-breadcrumb-slot > .ui-toolbar.ui-widget.ui-widget-header {
        padding: 0 var(--ds-space-md) !important;
    }

    body .custom-breadcrumb.ui-breadcrumb ul {
        gap: 6px !important;
    }

    body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link .ui-menuitem-text {
        max-width: 40vw;
    }
}

@media screen and (max-width: 520px) {
    body .custom-breadcrumb.ui-breadcrumb ul {
        gap: 4px !important;
    }

    body .custom-breadcrumb.ui-breadcrumb ul li.ui-breadcrumb-chevron {
        flex-basis: 10px !important;
        width: 10px !important;
    }

    body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link {
        min-height: 36px;
    }

    body .custom-breadcrumb.ui-breadcrumb .ui-menuitem-link .ui-menuitem-text {
        max-width: 44vw;
    }
}

.loader {
    display: block;
    margin: 0 auto;
    width: 72px;
    padding: 10px;
    box-sizing: border-box;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--button-primary-background, var(--ds-color-primary));
    --_m:
        conic-gradient(#0000 10%, #000),
        linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: loader-spin 1s infinite linear;
}

@keyframes loader-spin {
    to {
        transform: rotate(1turn);
    }
}

#loadingDialog_modal.ui-widget-overlay,
#loadingDialog_modal.ui-dialog-mask {
    opacity: 0 !important;
    background: transparent !important;
}

#loadingDialog.ui-dialog,
#loadingDialog .ui-dialog-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#loadingDialog.ui-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px) !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    overflow: hidden !important;
}

#loadingDialog .ui-dialog-content {
    padding: 0 !important;
    overflow: hidden !important;
}

/*  Footer  */
.layout-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 56px !important;
    padding: 0 !important;
    background: var(--ds-color-bg) !important;
    border-top: 1px solid var(--ds-color-border) !important;
    box-sizing: border-box !important;
    font-family: var(--ds-font-sans);
    width: 100%;
}

.lmp-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    gap: var(--ds-space-lg);
    max-width: var(--ds-max-width-wide);
    min-height: 56px;
    margin: 0 auto;
    padding: 0 var(--ds-space-lg);
    width: 100%;
}

.footer-menu {
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    align-self: center;
}

.footer-menu .ui-link,
.footer-menu a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--ds-radius-md);
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-caption);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text-secondary) !important;
    text-decoration: none !important;
    line-height: 16px;
    transition: background var(--ds-dur-fast) var(--ds-ease-default), color var(--ds-dur-fast) var(--ds-ease-default);
}

.footer-menu .ui-link:hover,
.footer-menu a:hover {
    background: var(--ds-color-surface);
    color: var(--ds-color-text-strong) !important;
}

.footer-copyright {
    display: inline-flex;
    align-items: center;
    align-self: center;
    min-width: 0;
}

.layout-footer span {
    margin-bottom: 0 !important;
}

.footer-copyright,
.footer-copyright span {
    font-family: var(--ds-font-sans);
    font-size: 12px;
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text-secondary);
    line-height: 16px;
    white-space: nowrap;
}

.lmp-footer-brand span {
    color: var(--ds-color-text-strong);
    font-weight: var(--ds-font-weight-semibold);
}

.lmp-footer-legal {
    justify-content: flex-end;
    text-align: right;
}

@media screen and (max-width: 1024px) {
    .layout-footer {
        justify-content: center !important;
        min-height: auto !important;
    }

    .lmp-footer-inner {
        min-height: 56px;
        padding: 10px var(--ds-space-md);
    }

    .footer-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px 4px;
    }

    .footer-menu .ui-link,
    .footer-menu a {
        padding: 2px 6px;
    }

    .footer-copyright span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media screen and (max-width: 640px) {
    .lmp-footer-inner {
        align-items: center;
        flex-direction: column;
        gap: var(--ds-space-xs);
        justify-content: center;
        min-height: 72px;
        padding: 12px var(--ds-space-md);
    }

    .footer-copyright,
    .footer-copyright span {
        justify-content: center;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .lmp-footer-legal {
        justify-content: center;
        text-align: center;
    }
}

/* LMP page components. Shared chrome stays in design-system.css. */

/*  Page Header  */
.lmp-page-header {
    padding: var(--ds-space-xl) 0 var(--ds-space-lg) 0;
    margin-bottom: var(--ds-space-sm);
    border-bottom: 1px solid rgba(219, 220, 222, 0.72);
}

.lmp-page-header-content {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-sm);
    max-width: 900px;
}

.lmp-page-title {
    font-family: var(--ds-font-sans);
    font-size: 26px;
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
    margin: 0;
    line-height: var(--ds-line-height-tight);
    letter-spacing: 0;
}

.lmp-page-subtitle {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-regular);
    color: var(--ds-color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/*  Cards  */
.lmp-card {
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-lg);
    /* Subtle elevation so the white card doesn't disappear into the
       light page background. Border + shadow combine for clear edges. */
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow var(--ds-dur-base) var(--ds-ease-default), border-color var(--ds-dur-base) var(--ds-ease-default);
}

.lmp-card:hover {
    box-shadow: var(--ds-shadow-card-hover);
}

body .layout-main .card {
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body .layout-main .card > .ui-toolbar,
body .layout-main .card > .ui-toolbar:first-child {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--ds-color-border) !important;
    border-radius: 0 !important;
    margin: calc(var(--ds-space-lg) * -1) calc(var(--ds-space-lg) * -1) 0 calc(var(--ds-space-lg) * -1) !important;
    padding: var(--ds-space-sm) var(--ds-space-lg) !important;
}

body .layout-main .card > .ui-datatable {
    margin: 0 calc(var(--ds-space-lg) * -1) calc(var(--ds-space-lg) * -1) calc(var(--ds-space-lg) * -1);
}

.lmp-card--flat {
    box-shadow: none;
}

.lmp-card--table {
    padding: 0;
    overflow: hidden;
}

.lmp-card--section {
    margin-bottom: var(--ds-space-xl);
}

/* When a child element should fill the card (data table, toolbar) it gets
   no additional border because the parent .lmp-card already provides one. */
.lmp-card > .ui-toolbar,
.lmp-card > .ui-toolbar:first-child {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--ds-color-border) !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.lmp-card > .ui-datatable,
.lmp-card > .ui-datatable .ui-datatable-tablewrapper {
    border: none !important;
}

.lmp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ds-space-12);
}

.lmp-card-title {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0;
}

.lmp-card-value {
    font-family: var(--ds-font-sans);
    font-size: 28px;
    font-weight: var(--ds-font-weight-bold);
    color: var(--ds-color-text-strong);
    line-height: 1.2;
}

.lmp-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--ds-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.lmp-card-icon.icon-blue {
    background: var(--ds-color-primary-soft);
    color: var(--ds-color-primary);
}

.lmp-card-icon.icon-green {
    background: var(--ds-color-success-bg);
    color: var(--ds-color-success);
}

.lmp-card-icon.icon-amber {
    background: var(--ds-color-warning-bg);
    color: var(--ds-color-warning);
}

.lmp-card-icon.icon-purple {
    background: #f5f0ff;
    color: #6b21a8;
}

/*  Metric Cards (Dashboard)  */
.lmp-metric-card {
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-sm);
    min-height: 104px;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--ds-dur-base) var(--ds-ease-default), border-color var(--ds-dur-base) var(--ds-ease-default);
}

.lmp-metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ds-color-primary), rgba(46, 163, 242, 0.38));
    opacity: 0;
    transition: opacity var(--ds-dur-fast) var(--ds-ease-default);
}

.lmp-metric-card:hover {
    border-color: var(--ds-color-border-strong);
    box-shadow: var(--ds-shadow-card-hover);
}

.lmp-metric-card:hover::before {
    opacity: 1;
}

.lmp-metric-label {
    font-family: var(--ds-font-sans);
    font-size: 12px;
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0;
}

.lmp-metric-value {
    font-family: var(--ds-font-sans);
    font-size: 28px;
    font-weight: var(--ds-font-weight-bold);
    color: var(--ds-color-text-strong);
    line-height: 1;
    letter-spacing: 0;
}

.lmp-metric-footer {
    font-family: var(--ds-font-sans);
    font-size: 12px;
    color: var(--ds-color-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
}

.lmp-metric-footer i {
    color: var(--ds-color-primary);
    font-size: 11px;
}

.lmp-dashboard-metrics {
    margin-bottom: var(--ds-space-md);
}

.lmp-summary-grid {
    align-items: stretch;
    margin-bottom: var(--ds-space-lg);
}

.lmp-metric-card--center {
    align-items: center;
    text-align: center;
}

.lmp-metric-card--center .lmp-card-header {
    justify-content: center;
    width: 100%;
}

.lmp-metric-card--fill {
    height: 100%;
}

.lmp-metric-card--executive {
    min-height: 124px;
}

.lmp-metric-card--executive .lmp-card-header {
    margin-bottom: var(--ds-space-md);
}

.lmp-stage-summary-grid {
    align-items: stretch;
    margin-bottom: var(--ds-space-xl);
}

.lmp-stage-summary-card {
    min-height: 132px;
    justify-content: center;
    border-top: 3px solid var(--ds-color-primary-soft);
    text-align: center;
}

/*  Empty States  */
.lmp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ds-space-2xl) var(--ds-space-lg);
    text-align: center;
    min-height: 180px;
}

/* Empty-state icon sits inside a soft circular tile so it has visual weight
   even when the icon glyph itself is light. */
.lmp-empty-state i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 24px;
    border-radius: 50%;
    color: var(--ds-color-text-secondary);
    background: var(--ds-color-surface);
    margin-bottom: var(--ds-space-md);
}

.lmp-empty-state h3 {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-h6);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
    margin: 0 0 var(--ds-space-xs) 0;
}

.lmp-empty-state p {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    color: var(--ds-color-text-secondary);
    margin: 0 0 var(--ds-space-md) 0;
    max-width: 360px;
    line-height: 1.5;
}

.lmp-empty-state-compact {
    padding: var(--ds-space-lg) var(--ds-space-md);
}

.lmp-empty-state-compact i {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-bottom: var(--ds-space-sm);
}

.lmp-empty-state-compact p {
    font-size: var(--ds-font-size-caption);
    margin-bottom: 0;
}

/*  Badges / Status pills  */
.lmp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--ds-radius-md);
    font-family: var(--ds-font-sans);
    font-size: 12px;
    font-weight: var(--ds-font-weight-semibold);
    line-height: 20px;
    white-space: nowrap;
    letter-spacing: 0;
}

.lmp-badge-pending {
    background: var(--ds-color-surface);
    color: var(--ds-color-text-secondary);
}

.lmp-badge-active {
    background: var(--ds-color-success-bg);
    color: var(--ds-color-success-text);
}

.lmp-badge-prospect {
    background: var(--ds-color-primary-soft);
    color: var(--ds-color-primary);
}

.lmp-badge-nda {
    background: var(--ds-color-warning-bg);
    color: var(--ds-color-warning-text);
}

.lmp-badge-offer {
    background: #fce7f3;
    color: #9d174d;
}

.lmp-badge-negotiation {
    background: #f3e8ff;
    color: #6b21a8;
}

.lmp-badge-executed {
    background: var(--ds-color-success-bg);
    color: var(--ds-color-success-text);
}

/*  Pipeline Board  */
.lmp-pipeline-board {
    padding: 0 0 var(--ds-space-lg) 0;
}

.lmp-pipeline-column {
    /* Column frame is a clean white panel — deal cards inside get a
       crisp border to differentiate from the panel itself. The page
       background already provides the "section grouping" tint, so the
       column body shouldn't double up on tinting. */
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color var(--ds-dur-fast) var(--ds-ease-default),
                box-shadow var(--ds-dur-fast) var(--ds-ease-default);
}

.lmp-pipeline-column:hover {
    border-color: var(--ds-color-border-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.lmp-pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ds-space-12) var(--ds-space-md);
    border-bottom: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface);
    border-radius: var(--ds-radius-md) var(--ds-radius-md) 0 0;
}

.lmp-pipeline-stage-name {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
    text-transform: uppercase;
    letter-spacing: 0;
}

.lmp-pipeline-stage-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--ds-radius-full);
    background: var(--ds-color-primary-soft);
    color: var(--ds-color-primary);
    font-size: 12px;
    font-weight: var(--ds-font-weight-semibold);
}

.lmp-pipeline-column-body {
    flex: 1;
    padding: var(--ds-space-12);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-sm);
    background: var(--ds-color-bg);
    border-radius: 0 0 var(--ds-radius-md) var(--ds-radius-md);
    transition: background var(--ds-dur-fast) var(--ds-ease-default),
                box-shadow var(--ds-dur-fast) var(--ds-ease-default);
}

.lmp-pipeline-column-droptarget {
    background: var(--ds-color-primary-soft, #eff6ff);
    box-shadow: inset 0 0 0 2px var(--ds-color-primary, #2563eb);
}

.lmp-pipeline-column-active {
    background: var(--ds-color-primary-soft, #eff6ff);
    box-shadow: inset 0 0 0 2px var(--ds-color-primary, #2563eb);
}

/*  Pipeline Deal Card  */
.lmp-deal-card {
    /* Sits inside a white column body — needs a stronger border + soft
       inner-tint so it reads as a distinct card, not just text on white. */
    background: var(--ds-color-surface-alt);
    border: 1px solid var(--ds-color-border);
    border-left: 3px solid var(--ds-color-border-strong);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-12);
    cursor: grab;
    transition: box-shadow var(--ds-dur-base) var(--ds-ease-default),
                border-color var(--ds-dur-base) var(--ds-ease-default),
                background var(--ds-dur-base) var(--ds-ease-default),
                transform var(--ds-dur-fast) var(--ds-ease-default);
    user-select: none;
}

.lmp-deal-card.ui-draggable-dragging {
    cursor: grabbing;
    box-shadow: var(--ds-shadow-lg, 0 12px 28px rgba(15, 23, 42, 0.18));
}

.lmp-deal-card:hover {
    background: var(--ds-color-bg);
    box-shadow: var(--ds-shadow-md);
    border-color: var(--ds-color-primary);
    border-left-color: var(--ds-color-primary);
    transform: translateY(-1px);
}

.lmp-deal-card-customer {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
    margin-bottom: 2px;
}

.lmp-deal-card-program {
    font-family: var(--ds-font-sans);
    font-size: 12px;
    color: var(--ds-color-text-secondary);
    margin-bottom: var(--ds-space-sm);
}

.lmp-deal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--ds-font-sans);
    font-size: 12px;
    color: var(--ds-color-text-secondary);
}

.lmp-deal-card-value {
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-primary);
}

/*  Report Cards  */
.lmp-report-card {
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-lg);
    text-align: center;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ds-space-sm);
    box-shadow: var(--ds-shadow-sm);
    transition: box-shadow var(--ds-dur-base) var(--ds-ease-default), border-color var(--ds-dur-base) var(--ds-ease-default);
}

.lmp-report-card:hover {
    box-shadow: var(--ds-shadow-card-hover);
    border-color: var(--ds-color-border-strong);
}

.lmp-report-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-primary-soft);
    color: var(--ds-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: var(--ds-space-xs);
}

.lmp-report-card h3 {
    font-family: var(--ds-font-sans);
    font-size: 15px;
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
    margin: 0;
}

.lmp-report-card p {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-caption);
    color: var(--ds-color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/*  Notice Banner  */
.lmp-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-10);
    padding: var(--ds-space-12) var(--ds-space-md);
    background: var(--ds-color-info-bg);
    border: 1px solid #bfdbfe;
    border-left: 3px solid var(--ds-color-info);
    border-radius: var(--ds-radius-md);
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-caption);
    color: var(--ds-color-info-text);
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.lmp-notice--section {
    margin-bottom: var(--ds-space-lg);
}

.lmp-notice--spaced-top {
    margin-top: var(--ds-space-lg);
}

.lmp-notice i {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--ds-color-info);
}

/*  Section Headers  */
.lmp-section-header {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-h6);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
    margin: var(--ds-space-lg) 0 var(--ds-space-12) 0;
    padding-bottom: var(--ds-space-sm);
    border-bottom: 1px solid var(--ds-color-border);
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
}

/*  Form Spacing  */
.lmp-form-group {
    margin-bottom: var(--ds-space-md);
}

.lmp-form-label {
    display: block;
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-caption);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text-strong);
    margin-bottom: var(--ds-space-xs);
}

.lmp-filter-card {
    background: linear-gradient(180deg, var(--ds-color-bg) 0%, var(--ds-color-surface-alt) 100%);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-lg);
    margin-bottom: var(--ds-space-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lmp-filter-field {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-sm);
    min-width: 0;
}

.lmp-filter-field .ui-selectonebutton,
.lmp-filter-field .ui-selectmanybutton {
    max-width: 100%;
}

.lmp-field-stack {
    margin-bottom: var(--ds-space-12);
}

.lmp-dialog-field {
    margin-bottom: var(--ds-space-sm);
}

.lmp-dialog-field--spaced {
    margin-top: var(--ds-space-12);
}

.lmp-dialog-label {
    display: block;
    margin-bottom: var(--ds-space-xs);
}

.lmp-input-full {
    width: 100% !important;
}

/*  Admin Page Header Description  */
.lmp-admin-description {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-caption);
    color: var(--ds-color-text-secondary);
    margin: 0 0 var(--ds-space-md) 0;
    line-height: 1.5;
}

/*  Quick Links Grid (Dashboard)  */
.lmp-quick-link {
    display: flex;
    align-items: center;
    gap: var(--ds-space-12);
    padding: var(--ds-space-md);
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    text-decoration: none;
    color: var(--ds-color-text-primary);
    min-height: 120px;
    transition: border-color var(--ds-dur-base) var(--ds-ease-default),
                box-shadow var(--ds-dur-base) var(--ds-ease-default),
                transform var(--ds-dur-fast) var(--ds-ease-default);
}

.lmp-quick-link:hover {
    border-color: var(--ds-color-primary);
    box-shadow: 0 1px 3px 0 rgba(48, 84, 118, 0.12);
    text-decoration: none;
    color: var(--ds-color-text-primary);
    opacity: 1;
    transform: translateY(-1px);
}

.lmp-quick-link i {
    font-size: 20px;
    color: var(--ds-color-primary);
    flex-shrink: 0;
}

.lmp-quick-link-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lmp-quick-link-title {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-strong);
}

.lmp-quick-link-desc {
    font-family: var(--ds-font-sans);
    font-size: 12px;
    color: var(--ds-color-text-secondary);
}

/*  Deal Detail Header Panel  */
.lmp-deal-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--ds-space-md);
    padding: var(--ds-space-lg);
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    margin-bottom: var(--ds-space-md);
    box-shadow: var(--ds-shadow-sm);
}

.lmp-deal-hero {
    display: grid;
    grid-template-columns: minmax(240px, 1.2fr) minmax(320px, 2fr);
    gap: var(--ds-space-lg);
    align-items: stretch;
    padding: var(--ds-space-lg);
    margin-bottom: var(--ds-space-lg);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.lmp-deal-hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--ds-space-sm);
    min-width: 0;
}

.lmp-overline {
    font-size: 11px;
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-primary);
    text-transform: uppercase;
    letter-spacing: 0;
}

.lmp-deal-hero-title {
    margin: 0;
    font-size: var(--ds-font-size-h4);
    line-height: 1.25;
    color: var(--ds-color-text-strong);
    overflow-wrap: anywhere;
}

.lmp-deal-hero-subtitle {
    margin: 0;
    color: var(--ds-color-text-secondary);
    font-size: var(--ds-font-size-small);
}

.lmp-deal-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--ds-space-sm);
}

.lmp-deal-hero-grid > .lmp-deal-field,
.lmp-deal-stat {
    min-width: 0;
    padding: var(--ds-space-12);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
}

.lmp-deal-hero-grid > .lmp-deal-field .lmp-deal-field-label,
.lmp-deal-stat .lmp-deal-field-label {
    margin-bottom: 4px;
    display: block;
}

.lmp-deal-signal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--ds-space-md);
    margin-bottom: var(--ds-space-lg);
}

.lmp-deal-signal-grid > .lmp-deal-field,
.lmp-signal-card {
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-md);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lmp-deal-main-column {
    grid-column: 1;
    grid-row: 1;
}

.lmp-deal-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: var(--ds-space-lg);
    align-items: start;
}

.lmp-deal-main-column,
.lmp-deal-side-column {
    min-width: 0;
}

.lmp-deal-side-column {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-md);
    grid-column: 2;
    grid-row: 1;
}

.lmp-deal-main-column:only-child {
    grid-column: 1 / -1;
}

.lmp-action-panel {
    background: var(--ds-color-bg);
    border: 1px solid var(--ds-color-border);
    border-left: 3px solid var(--ds-color-primary);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lmp-action-panel--muted {
    border-left-color: var(--ds-color-border-strong);
}

.lmp-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--ds-space-sm);
    margin-top: var(--ds-space-md);
}

.lmp-deal-field {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-xs);
}

.lmp-deal-field-label {
    font-family: var(--ds-font-sans);
    font-size: 11px;
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0;
}

.lmp-deal-field-value {
    font-family: var(--ds-font-sans);
    font-size: var(--ds-font-size-small);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text-strong);
}

.lmp-deal-field-value.value-large {
    font-size: var(--ds-font-size-h4);
    font-weight: var(--ds-font-weight-bold);
    color: var(--ds-color-primary);
    letter-spacing: 0;
}

.lmp-deal-field-value.value-muted {
    /* Italic + light color marks "no data" / placeholder cells without
       making them illegible. Color stays text-muted because the italic +
       em-dash glyph carries the meaning, not the text itself. */
    color: var(--ds-color-text-muted);
    font-style: italic;
    font-weight: var(--ds-font-weight-regular);
}

/* Stage-changed row marker for activity timeline.
   Background fills the row; the left accent strip only marks the
   first cell so it reads as a single row marker, not as cell borders. */
.lmp-stage-changed-row > td {
    background: var(--ds-color-primary-soft) !important;
}

.lmp-stage-changed-row > td:first-child {
    border-left: 3px solid var(--ds-color-primary) !important;
    padding-left: calc(var(--ds-space-12) - 3px);
}

/*  Responsive  */
@media screen and (max-width: 980px) {
    .layout-content {
        padding: 0 var(--ds-space-md) var(--ds-space-md) var(--ds-space-md);
    }
}

@media screen and (max-width: 768px) {
    .lmp-page-title {
        font-size: 20px;
    }

    .lmp-page-header {
        padding: var(--ds-space-md) 0 var(--ds-space-12) 0;
    }

    .lmp-deal-header {
        grid-template-columns: repeat(2, 1fr);
        padding: var(--ds-space-md);
    }

    .lmp-deal-hero,
    .lmp-deal-workspace-grid {
        grid-template-columns: 1fr;
    }

    .lmp-deal-main-column,
    .lmp-deal-side-column {
        grid-column: auto;
        grid-row: auto;
    }

    .lmp-deal-hero-grid,
    .lmp-deal-signal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lmp-pipeline-board .grid {
        flex-direction: column;
    }

    .lmp-pipeline-column {
        min-height: 200px;
    }

    .lmp-card,
    .lmp-metric-card {
        padding: var(--ds-space-md);
    }
}

@media screen and (max-width: 520px) {
    .lmp-deal-header,
    .lmp-deal-hero-grid,
    .lmp-deal-signal-grid {
        grid-template-columns: 1fr;
    }

    .lmp-action-bar {
        align-items: stretch;
        flex-direction: column;
    }
}
