/*
 * Shared Portal UI component library.
 *
 * These primitives capture the statistics-events visual language in one reusable layer so
 * portal pages can compose the same headers, cards, filters, rows, and empty states without
 * redefining large inline CSS blocks per view.
 */

:root {
    --portal-ui-surface: linear-gradient(180deg, #151b24 0%, #121821 100%);
    --portal-ui-surface-strong: linear-gradient(180deg, #151d29 0%, #111824 100%);
    --portal-ui-border: var(--portal-border-soft, rgba(255, 255, 255, 0.14));
    --portal-ui-border-strong: rgba(255, 173, 96, 0.3);
    --portal-ui-radius: var(--portal-radius-md, 1rem);
    --portal-ui-shadow: var(--portal-shadow-deep, 0 16px 30px rgba(0, 0, 0, 0.35));
    --portal-ui-pad-x: 1.12rem;
    --portal-ui-pad-y: 1rem;
    --portal-ui-muted: #95a3b8;
    --portal-ui-muted-strong: #b9c8dc;
    --portal-ui-title: #f4f8ff;
    --portal-ui-text: #dbe5f7;
    --portal-ui-count-pill-bg: rgba(255, 122, 0, 0.16);
    --portal-ui-count-pill-border: rgba(255, 174, 112, 0.34);
    --portal-ui-count-pill-text: #ffd6af;
    --portal-ui-control-height: 36px;
}

.portal-ui-shell {
    display: grid;
    gap: 0;
}

.portal-ui-shell--revenue-detail {
    /* Revenue detail pages stack one hero block above dense operational sections and need a fixed vertical gap. */
    gap: 1rem;
}

.portal-ui-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.portal-ui-header--detail {
    margin-bottom: 1.2rem;
    gap: 0.7rem;
}

.portal-ui-header__main {
    min-width: 0;
}

.portal-ui-header--detail .portal-ui-header__main {
    /* Detail headers keep the content block flexible so header actions can stay right-aligned on wider screens. */
    flex: 1 1 auto;
}

.portal-ui-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
}

.portal-ui-header__title {
    margin: 0;
    color: var(--portal-ui-title);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.portal-ui-header--overview .portal-ui-header__title {
    font-size: 1.615rem;
}

.portal-ui-header--detail .portal-ui-header__title {
    font-size: clamp(1.62rem, 2.7vw, 2.15rem);
}

.portal-ui-header__suffix {
    color: var(--portal-ui-muted);
    font-size: 0.92em;
}

.portal-ui-header__title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.portal-ui-header__subtitle {
    margin-top: 0.3rem;
    color: var(--portal-ui-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.portal-ui-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    /* Keep the back link visually separated from the header title block on every shared page header. */
    margin-bottom: 0.45rem;
    color: #9badc7;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.portal-ui-back-link:hover,
.portal-ui-back-link:focus {
    color: #ffb167;
}

.portal-ui-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem 0.52rem;
    margin-top: 0.08rem;
    color: #97a8c2;
    font-size: 0.9rem;
}

.portal-ui-header--detail .portal-ui-header__meta {
    /* Detail headers need a bit more separation so the meta row does not visually stick to the larger title. */
    margin-top: 0.32rem;
}

.portal-ui-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    line-height: 1.35;
}

.portal-ui-header__meta-item i {
    color: #d7e5f7;
    opacity: 0.9;
}

.portal-ui-header__meta-separator {
    color: #64748d;
}

.portal-ui-header__meta-link {
    color: #dbe5f7;
    text-decoration: none;
}

.portal-ui-header__meta-link:hover,
.portal-ui-header__meta-link:focus {
    color: #ffb167;
    text-decoration: underline;
}

.portal-ui-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.45rem;
    margin-top: 0.5rem;
}

.portal-ui-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.portal-ui-header--detail .portal-ui-header__actions {
    /* Prevent the action rail from shrinking into a wrapped second line before the mobile breakpoint takes over. */
    flex: 0 0 auto;
}

.portal-ui-filter-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.portal-ui-filter-bar__group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.portal-ui-filter-bar__group--trailing {
    margin-left: auto;
}

.portal-ui-filter-bar__item {
    min-width: 0;
}

.portal-ui-filter-bar__item--year {
    min-width: 140px;
}

.portal-ui-filter-bar__group--trailing .portal-ui-filter-bar__item--year {
    /* Right-align fit-width year pickers inside the trailing slot so the visible control reaches the filter bar edge. */
    display: flex;
    justify-content: flex-end;
}

.portal-ui-filter-bar .selectpicker + .dropdown-toggle,
.portal-ui-filter-bar .bootstrap-select > .dropdown-toggle,
.portal-ui-filter-bar .form-control,
.portal-ui-filter-bar .form-select,
.portal-ui-filter-bar .btn.portal-control-btn,
.portal-ui-filter-bar .btn-group > .btn.portal-control-btn,
.portal-ui-filter-bar .btn-group > .btn {
    min-height: var(--portal-ui-control-height);
}

.portal-ui-filter-bar .selectpicker + .dropdown-toggle,
.portal-ui-filter-bar .bootstrap-select > .dropdown-toggle,
.portal-ui-filter-bar .form-control,
.portal-ui-filter-bar .form-select,
.portal-ui-filter-bar .btn.portal-control-btn,
.portal-ui-filter-bar .btn-group > .btn.portal-control-btn {
    display: inline-flex;
    align-items: center;
}

.portal-ui-segmented-control {
    display: inline-flex;
    align-items: stretch;
    min-height: var(--portal-ui-control-height);
    border-radius: 999px;
    border: 1px solid rgba(255, 173, 96, 0.6);
    background: rgba(255, 122, 0, 0.08);
    box-shadow: 0 8px 18px rgba(255, 122, 0, 0.12);
    overflow: hidden;
}

.portal-ui-segmented-control__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.portal-ui-segmented-control__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: var(--portal-ui-control-height);
    margin: 0;
    padding: 0 1rem;
    color: #ffd8b4;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.portal-ui-segmented-control__label + .portal-ui-segmented-control__label {
    border-left: 1px solid rgba(255, 173, 96, 0.5);
}

.portal-ui-segmented-control__label i {
    font-size: 0.9rem;
}

.portal-ui-segmented-control__input:checked + .portal-ui-segmented-control__label {
    background: rgba(255, 122, 0, 0.16);
    color: #fff2e3;
    box-shadow: inset 0 1px 0 rgba(255, 206, 160, 0.18);
}

.portal-ui-segmented-control__input:focus-visible + .portal-ui-segmented-control__label {
    outline: 2px solid rgba(255, 173, 96, 0.75);
    outline-offset: -2px;
}

.portal-ui-segmented-tabs-shell {
    max-width: 100%;
    margin-bottom: 0.95rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
}

.portal-ui-segmented-tabs-shell--wrap {
    overflow: visible;
}

.portal-ui-segmented-tabs-shell--detail {
    overflow: visible;
    margin-bottom: 1rem;
}

.portal-ui-segmented-tabs-shell::-webkit-scrollbar {
    height: 6px;
}

.portal-ui-segmented-tabs-shell::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.portal-ui-segmented-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: var(--portal-ui-control-height);
    border: 1px solid rgba(255, 122, 0, 0.4);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #0f1724;
}

.portal-ui-segmented-tabs-shell--wrap .portal-ui-segmented-tabs {
    flex-wrap: wrap;
}

.portal-ui-segmented-tabs--detail {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.28rem;
    min-height: 0;
    border: 1px solid rgba(132, 147, 168, 0.2);
    border-radius: 1rem;
    background: rgba(17, 25, 35, 0.78);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.portal-ui-segmented-tabs__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--portal-ui-control-height);
    padding: 0 0.9rem;
    border-right: 1px solid rgba(255, 122, 0, 0.4);
    color: #a9b7cc;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.portal-ui-segmented-tabs__item:last-child {
    border-right: 0;
}

.portal-ui-segmented-tabs--detail .portal-ui-segmented-tabs__item {
    gap: 0.55rem;
    min-height: var(--portal-ui-control-height);
    padding: 0 1rem;
    border-right: 0;
    border-radius: 0.8rem;
    color: #9fb2cb;
    font-size: 0.92rem;
    font-weight: 640;
    line-height: 1;
}

.portal-ui-segmented-tabs__item:hover,
.portal-ui-segmented-tabs__item:focus-visible {
    background: rgba(255, 122, 0, 0.08);
    color: #ffd8b3;
}

.portal-ui-segmented-tabs--detail .portal-ui-segmented-tabs__item:hover,
.portal-ui-segmented-tabs--detail .portal-ui-segmented-tabs__item:focus-visible {
    color: #ffe1c4;
}

.portal-ui-segmented-tabs__item--active {
    background: linear-gradient(180deg, rgba(255, 151, 62, 0.32) 0%, rgba(255, 122, 0, 0.24) 100%);
    color: #ffe7cd;
    font-weight: 650;
    box-shadow: inset 0 0 0 1px rgba(255, 170, 106, 0.42);
}

.portal-ui-segmented-tabs--detail .portal-ui-segmented-tabs__item--active {
    background: linear-gradient(180deg, rgba(255, 151, 62, 0.28) 0%, rgba(255, 122, 0, 0.22) 100%);
    color: #fff2e3;
    box-shadow: inset 0 0 0 1px rgba(255, 173, 96, 0.32);
}

.portal-ui-segmented-tabs__item--disabled {
    color: #7f8ea4;
    cursor: default;
    background: rgba(255, 255, 255, 0.03);
}

.portal-ui-segmented-tabs__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    min-height: 1.45rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 0.74rem;
    font-weight: 700;
}

.portal-ui-detail-tabs {
    display: grid;
    gap: 1rem;
}

.portal-ui-detail-tabs__nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.28rem;
    border-radius: 1rem;
    border: 1px solid rgba(132, 147, 168, 0.2);
    background: rgba(17, 25, 35, 0.78);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.portal-ui-detail-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: var(--portal-ui-control-height);
    padding: 0 1rem;
    border: 0;
    border-radius: 0.8rem;
    background: transparent;
    color: #9fb2cb;
    font-size: 0.92rem;
    font-weight: 640;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.portal-ui-detail-tabs__tab:hover,
.portal-ui-detail-tabs__tab:focus-visible {
    background: rgba(255, 122, 0, 0.08);
    color: #ffe1c4;
}

.portal-ui-detail-tabs__tab.active {
    background: linear-gradient(180deg, rgba(255, 151, 62, 0.28) 0%, rgba(255, 122, 0, 0.22) 100%);
    color: #fff2e3;
    box-shadow: inset 0 0 0 1px rgba(255, 173, 96, 0.32);
}

.portal-ui-detail-tabs__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    min-height: 1.45rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 0.74rem;
    font-weight: 700;
}

.portal-ui-detail-tabs__pane {
    min-width: 0;
}

.portal-ui-metrics-grid {
    margin-bottom: 1rem;
}

.portal-ui-metric-card,
.portal-ui-panel,
.portal-ui-entity-row,
.portal-ui-empty-state {
    border-radius: var(--portal-ui-radius);
    border: 1px solid var(--portal-ui-border);
    background: var(--portal-ui-surface);
    color: var(--portal-ui-text);
}

.portal-ui-metric-card {
    padding: 1.08rem 1.14rem;
    height: 100%;
}

.portal-ui-metric-card__label {
    margin-bottom: 0.2rem;
    color: #8f9cb2;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.portal-ui-metric-card__label[data-bs-toggle="tooltip"] {
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.portal-ui-metric-card__value {
    color: #fff;
    font-size: clamp(1.35rem, 1.8vw, 1.85rem);
    font-weight: 700;
    line-height: 1.16;
}

.portal-ui-metric-card__value--compact {
    font-size: 1.25rem;
}

.portal-ui-metric-card__value--muted {
    color: var(--portal-ui-muted);
}

.portal-ui-metric-card__value--success {
    color: #19af62;
}

.portal-ui-metric-card__value--warning {
    color: #f99923;
}

.portal-ui-metric-card__value--danger {
    color: #dc3545;
}

.portal-ui-metric-card__stack {
    display: grid;
    gap: 0.18rem;
}

.portal-ui-metric-card__sub-value {
    margin-top: 0.36rem;
    color: #9babc2;
    font-size: 0.78rem;
    line-height: 1.4;
}

.portal-ui-panel {
    /* Shared panels fill the Bootstrap column height so adjacent cards stay visually aligned. */
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--portal-ui-shadow);
}

.portal-ui-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem 1.08rem 0;
}

.portal-ui-panel__header--compact {
    padding-top: 0.88rem;
}

.portal-ui-panel__title {
    margin: 0;
    color: #95a3b8;
    font-size: 0.74rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portal-ui-panel__subtitle {
    margin-top: 0.24rem;
    color: #8fa2bd;
    font-size: 0.78rem;
    line-height: 1.35;
}

.portal-ui-panel__body {
    /* Let the body consume the remaining panel height after the header. */
    flex: 1 1 auto;
    padding: 0.92rem 1.08rem 1.08rem;
}

.portal-ui-panel__body--flush {
    padding: 0;
}

.portal-ui-panel--warm {
    background:
        radial-gradient(145% 120% at 100% 0%, rgba(255, 122, 0, 0.18) 0%, rgba(255, 122, 0, 0) 62%),
        linear-gradient(180deg, #151b24 0%, #121821 100%);
}

.portal-ui-panel--cool {
    background:
        radial-gradient(150% 125% at 100% 0%, rgba(93, 177, 236, 0.18) 0%, rgba(93, 177, 236, 0) 64%),
        linear-gradient(180deg, #151b24 0%, #121821 100%);
}

.portal-ui-panel--overlay {
    border: 1px solid rgba(136, 156, 191, 0.38);
    background:
        radial-gradient(145% 130% at 100% 0%, rgba(255, 122, 0, 0.16) 0%, rgba(255, 122, 0, 0) 62%),
        linear-gradient(180deg, rgba(17, 26, 37, 0.98) 0%, rgba(12, 19, 29, 0.98) 100%);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(7px);
}

.portal-ui-panel--map {
    background: #111a24;
    border-color: rgba(126, 156, 191, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.portal-ui-panel--map .portal-ui-panel__header {
    padding: 0.9rem 1rem 0.72rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.portal-ui-panel--map .portal-ui-panel__body {
    /* Make the map body a flex container so the canvas can stretch to the full remaining height. */
    display: flex;
    padding: 0;
}

.portal-ui-chart-panel canvas,
.portal-ui-chart-panel .portal-ui-chart-panel__canvas {
    filter: saturate(1.06);
}

.portal-ui-chart-panel__canvas-wrap {
    position: relative;
    min-height: 220px;
    height: 100%;
}

.portal-ui-chart-panel__canvas-wrap--compact {
    min-height: 120px;
}

.portal-ui-chart-panel__canvas-wrap--center {
    display: flex;
    align-items: center;
}

.portal-ui-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.72rem;
    margin: 1.54rem 0 0.92rem;
    padding-top: 0.64rem;
}

.portal-ui-section-header--compact {
    margin-top: 1.08rem;
    padding-top: 0.2rem;
}

.portal-ui-section-header__title {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    margin: 0;
    color: #9badc7;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portal-ui-section-header__title::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff9f42 0%, #ff7a00 100%);
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.14);
}

.portal-ui-section-header__subtitle {
    margin-top: 0.24rem;
    color: #7f92ad;
    font-size: 0.82rem;
    line-height: 1.45;
}

.portal-ui-count-pill {
    display: inline-flex;
    align-items: center;
    margin-top: 0.06rem;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    border: 1px solid var(--portal-ui-count-pill-border);
    background: var(--portal-ui-count-pill-bg);
    color: var(--portal-ui-count-pill-text);
    font-size: 0.72rem;
    font-weight: 640;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-ui-empty-state {
    padding: 2.4rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-style: dashed;
    text-align: center;
}

.portal-ui-empty-state__icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.7rem;
    font-size: 2rem;
    color: #a4b2c7;
}

.portal-ui-empty-state__title {
    margin: 0 0 0.35rem;
    color: #ecf3ff;
    font-size: 1rem;
}

.portal-ui-empty-state__body {
    margin: 0;
    color: var(--portal-ui-muted);
}

.portal-ui-empty-state__action {
    margin-top: 0.9rem;
}

.portal-ui-entity-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.96rem 1.4rem;
    padding: 1rem 1.16rem;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-ui-entity-row:hover,
.portal-ui-entity-row:focus,
.portal-ui-entity-row:focus-within {
    transform: translateY(-1px);
    border-color: rgba(255, 183, 120, 0.26);
    color: #fff;
}

.portal-ui-entity-row__overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.portal-ui-entity-row__overlay-link:focus-visible {
    outline: 2px solid rgba(255, 173, 96, 0.7);
    outline-offset: 2px;
}

.portal-ui-entity-row__main {
    min-width: 0;
    display: grid;
    gap: 0.48rem;
}

.portal-ui-entity-row__topline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.portal-ui-entity-row__title {
    margin: 0;
    color: #f2f7ff;
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.2;
}

.portal-ui-entity-row--event .portal-ui-entity-row__title {
    font-size: 1.45rem;
    line-height: 1.16;
}

.portal-ui-entity-row--shift {
    padding: 1.05rem 1.34rem;
}

.portal-ui-entity-row--shift .portal-ui-entity-row__main {
    gap: 0.34rem;
}

.portal-ui-entity-row--shift .portal-ui-entity-row__title {
    font-size: 1rem;
    font-weight: 650;
}

.portal-ui-entity-row--shift .portal-ui-entity-row__trailing {
    min-width: 220px;
    gap: 0.2rem;
}

.portal-ui-entity-row--shift .portal-ui-entity-row__trailing-value {
    font-size: 0.95rem;
    font-weight: 620;
}

.portal-ui-entity-row--shift .portal-ui-entity-row__trailing-subvalue {
    font-size: 0.8rem;
    font-weight: 620;
}

.portal-ui-entity-row__meta,
.portal-ui-entity-row__secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.52rem;
    color: #96a8c2;
    font-size: 0.84rem;
    line-height: 1.45;
}

.portal-ui-entity-row__secondary {
    gap: 0.2rem 0.92rem;
    font-size: 0.78rem;
}

.portal-ui-entity-row__meta-item,
.portal-ui-entity-row__secondary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
}

.portal-ui-entity-row__meta-item i,
.portal-ui-entity-row__secondary-item i {
    color: #d7e5f7;
}

.portal-ui-entity-row__meta-separator {
    color: rgba(186, 201, 222, 0.28);
    font-size: 0.74rem;
}

.portal-ui-entity-row__meta-link {
    color: #dbe5f7;
    text-decoration: none;
}

.portal-ui-entity-row__meta-link:hover,
.portal-ui-entity-row__meta-link:focus {
    color: #ffb167;
    text-decoration: underline;
}

.portal-ui-entity-row__trailing {
    min-width: 170px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.14rem;
}

.portal-ui-entity-row__trailing--actions {
    position: relative;
    z-index: 2;
    min-width: 0;
    text-align: left;
    align-items: flex-end;
}

.portal-ui-entity-row__action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.48rem;
    flex-wrap: wrap;
}

.portal-ui-entity-row__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 29px;
    padding: 0.3rem 0.68rem;
    border-radius: 999px;
    border: 1px solid rgba(188, 205, 229, 0.2);
    background: rgba(23, 31, 45, 0.72);
    color: #e8f0fc;
    font-size: 0.75rem;
    font-weight: 620;
    line-height: 1;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.portal-ui-entity-row__action:hover,
.portal-ui-entity-row__action:focus-visible {
    color: #f4f8ff;
    text-decoration: none;
    transform: translateY(-1px);
}

.portal-ui-entity-row__action:focus-visible {
    outline: 2px solid rgba(255, 173, 96, 0.52);
    outline-offset: 2px;
}

.portal-ui-entity-row__action--details {
    border-color: rgba(255, 173, 96, 0.28);
    background: rgba(255, 173, 96, 0.1);
    color: #ecd1b5;
}

.portal-ui-entity-row__action--details:hover,
.portal-ui-entity-row__action--details:focus-visible {
    border-color: rgba(255, 173, 96, 0.4);
    background: rgba(255, 173, 96, 0.15);
    color: #f8debf;
}

.portal-ui-entity-row__action--statistics {
    border-color: rgba(206, 219, 238, 0.14);
    background: rgba(29, 39, 56, 0.68);
    color: #d4deed;
}

.portal-ui-entity-row__action--statistics:hover,
.portal-ui-entity-row__action--statistics:focus-visible {
    border-color: rgba(220, 231, 246, 0.22);
    background: rgba(37, 49, 69, 0.82);
    color: #e2ebf8;
}

.portal-ui-entity-row__trailing-label {
    color: #8ea1bd;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-ui-entity-row__trailing-value {
    color: #eef4ff;
    font-size: 1.82rem;
    font-weight: 700;
    line-height: 1.15;
}

.portal-ui-entity-row__trailing-value--compact {
    font-size: 1rem;
}

.portal-ui-entity-row__trailing-subvalue,
.portal-ui-entity-row__trailing-stack {
    color: #9db0ca;
    font-size: 0.78rem;
}

.portal-ui-entity-row__trailing-stack {
    display: grid;
    gap: 0.18rem;
}

.portal-ui-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    padding: 0.18rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(173, 186, 205, 0.16);
    background: rgba(173, 186, 205, 0.07);
    color: #b7c7dc;
    font-size: 0.68rem;
    font-weight: 620;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-ui-badge--metric {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.76rem;
    font-weight: 500;
    padding: 0.22rem 0.56rem;
    border-color: rgba(133, 151, 178, 0.28);
    background: rgba(133, 151, 178, 0.12);
    color: #b9c8dc;
}

.portal-ui-badge--metric i {
    font-size: 0.72rem;
}

.portal-ui-badge--dry {
    border-color: rgba(85, 194, 146, 0.2);
    background: rgba(56, 140, 105, 0.11);
    color: #7ccba8;
}

.portal-ui-badge--cold {
    border-color: rgba(131, 198, 255, 0.26);
    background: rgba(49, 109, 171, 0.14);
    color: #9fd1ff;
}

.portal-ui-badge--warm {
    border-color: rgba(255, 133, 84, 0.34);
    background: rgba(181, 77, 24, 0.19);
    color: #ffab7f;
}

.portal-ui-badge--very-warm {
    border-color: rgba(255, 103, 79, 0.38);
    background: rgba(162, 45, 23, 0.24);
    color: #ff977c;
}

.portal-ui-badge--mixed {
    border-color: rgba(233, 182, 76, 0.22);
    background: rgba(197, 140, 28, 0.1);
    color: #e1bc72;
}

.portal-ui-badge--wet {
    border-color: rgba(108, 163, 233, 0.24);
    background: rgba(55, 102, 176, 0.1);
    color: #8cb4e5;
}

.portal-ui-badge--unknown {
    border-color: rgba(163, 176, 198, 0.2);
    background: rgba(94, 108, 130, 0.09);
    color: #b6c3d4;
}

.portal-ui-badge--success {
    border-color: rgba(85, 194, 146, 0.2);
    background: rgba(56, 140, 105, 0.11);
    color: #7ccba8;
}

.portal-ui-badge--warning {
    border-color: rgba(233, 182, 76, 0.22);
    background: rgba(197, 140, 28, 0.1);
    color: #e1bc72;
}

.portal-ui-badge--danger {
    border-color: rgba(255, 103, 79, 0.32);
    background: rgba(162, 45, 23, 0.22);
    color: #ff977c;
}

.portal-ui-badge--active,
.portal-ui-badge--open {
    border-color: rgba(85, 194, 146, 0.2);
    background: rgba(56, 140, 105, 0.11);
    color: #7ccba8;
}

.portal-ui-badge--inactive,
.portal-ui-badge--closed {
    border-color: rgba(163, 176, 198, 0.2);
    background: rgba(94, 108, 130, 0.09);
    color: #b6c3d4;
}

.portal-ui-badge--archived,
.portal-ui-badge--manual {
    border-color: rgba(233, 182, 76, 0.22);
    background: rgba(197, 140, 28, 0.1);
    color: #e1bc72;
}

.portal-ui-badge--info {
    border-color: rgba(108, 163, 233, 0.24);
    background: rgba(55, 102, 176, 0.1);
    color: #8cb4e5;
}

.portal-ui-status-badge--sm {
    font-size: 0.64rem;
    padding: 0.16rem 0.5rem;
}

.portal-ui-status-badge--md {
    font-size: 0.72rem;
    padding: 0.22rem 0.6rem;
}

.portal-ui-table-wrap {
    position: relative;
    border-radius: var(--portal-radius-md);
    overflow: hidden;
    border: 1px solid rgba(137, 157, 185, 0.22);
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow-soft);
}

.portal-ui-table-wrap::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 2;
}

.portal-ui-table-wrap .table {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.portal-ui-table-wrap .table thead.table-light {
    --bs-table-bg: rgba(155, 176, 204, 0.08);
    --bs-table-color: #f5f8ff;
}

.portal-ui-table-wrap .table thead th {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-color: var(--portal-border-soft);
}

.portal-ui-table-wrap .table tbody tr {
    --bs-table-bg: transparent;
    --bs-table-color: #d6e2f3;
}

.portal-ui-table-wrap .table > :not(caption) > * > * {
    border-color: var(--portal-border-soft);
}

.portal-ui-table-wrap .table tbody td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    vertical-align: middle;
}

.portal-ui-data-table-shell {
    display: grid;
    gap: 1rem;
}

.portal-ui-form-section-card {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(132, 147, 168, 0.24);
    background: linear-gradient(180deg, rgba(21, 29, 40, 0.94) 0%, rgba(17, 25, 35, 0.9) 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.portal-ui-form-section-card--danger {
    border-color: rgba(255, 103, 79, 0.28);
    box-shadow: 0 10px 24px rgba(84, 24, 11, 0.18);
}

.portal-ui-form-section-card__head {
    padding: 1.08rem 1.18rem 0;
}

.portal-ui-form-section-card__title {
    margin: 0;
    color: #f4f8ff;
    font-size: 1rem;
    font-weight: 640;
    line-height: 1.25;
}

.portal-ui-form-section-card__subtitle {
    margin: 0.18rem 0 0;
    color: #8496b0;
    font-size: 0.82rem;
    line-height: 1.45;
}

.portal-ui-form-section-card__body {
    padding: 1.18rem 1.24rem 1.2rem;
}

.portal-ui-form-section-card__head + .portal-ui-form-section-card__body {
    padding-top: 0.88rem;
}

.portal-ui-form-section-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem;
    padding: 1rem 1.24rem 1.18rem;
    border-top: 1px solid rgba(126, 141, 163, 0.16);
}

.portal-ui-danger-action-card > .portal-ui-form-section-card {
    height: 100%;
}

.portal-ui-disclosure-panels {
    display: grid;
    gap: 0.92rem;
}

.portal-ui-disclosure-panel {
    border: 1px solid rgba(132, 147, 168, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(21, 29, 40, 0.94) 0%, rgba(17, 25, 35, 0.9) 100%);
    overflow: hidden;
}

.portal-ui-disclosure-panel--danger {
    border-color: rgba(255, 103, 79, 0.24);
}

.portal-ui-disclosure-panel__button {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 0.98rem 1.08rem !important;
    border: 0;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

.portal-ui-disclosure-panel__button:not(.collapsed) {
    background: rgba(255, 255, 255, 0.02) !important;
}

.portal-ui-disclosure-panel__button::after {
    margin-top: 0.16rem;
    filter: invert(83%) sepia(11%) saturate(419%) hue-rotate(180deg) brightness(90%) contrast(86%);
    opacity: 0.86;
}

.portal-ui-disclosure-panel__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
    min-width: 0;
    text-align: left;
}

.portal-ui-disclosure-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    color: #f4f8ff;
    font-size: 0.96rem;
    font-weight: 640;
    line-height: 1.25;
}

.portal-ui-disclosure-panel__title::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff9f42 0%, #ff7a00 100%);
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.14);
    flex-shrink: 0;
}

.portal-ui-disclosure-panel__subtitle {
    color: #8194af;
    font-size: 0.82rem;
    line-height: 1.4;
}

.portal-ui-disclosure-panel__summary {
    margin-left: auto;
    margin-top: 0.08rem;
    flex-shrink: 0;
}

.portal-ui-disclosure-panel__body {
    padding: 0 1.08rem 1.08rem;
}

.portal-ui-disclosure-panel__body > .portal-ui-table-wrap,
.portal-ui-disclosure-panel__body > .portal-ui-empty-state,
.portal-ui-disclosure-panel__body > .portal-ui-panel,
.portal-ui-disclosure-panel__body > .portal-ui-form-section-card,
.portal-ui-disclosure-panel__body > .portal-ui-disclosure-panel__stack {
    margin-top: 0.78rem;
}

.portal-ui-disclosure-panel__stack {
    display: grid;
    gap: 0.78rem;
}

.portal-ui-transaction-feed {
    display: grid;
    gap: 1rem;
}

.portal-ui-transaction-feed__toolbar {
    display: grid;
    gap: 0.7rem;
}

.portal-ui-transaction-feed__search {
    position: relative;
}

.portal-ui-transaction-feed__search-icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: #8ea0bb;
    font-size: 0.82rem;
    pointer-events: none;
}

.portal-ui-transaction-feed__search-input {
    width: 100%;
    min-height: 2.85rem;
    padding: 0.7rem 0.95rem 0.7rem 2.5rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(143, 163, 192, 0.2);
    background: rgba(8, 12, 18, 0.34);
    color: #eef4ff;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.portal-ui-transaction-feed__search-input::placeholder {
    color: #8ea0bb;
}

.portal-ui-transaction-feed__search-input:focus {
    outline: none;
    border-color: rgba(255, 154, 73, 0.42);
    background: rgba(8, 12, 18, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 154, 73, 0.12);
}

.portal-ui-transaction-feed__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.portal-ui-transaction-feed__filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.26rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(143, 163, 192, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: #c7d4e7;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.portal-ui-transaction-feed__filter:hover {
    border-color: rgba(255, 255, 255, 0.22);
    color: #eef4ff;
}

.portal-ui-transaction-feed__filter.is-active {
    border-color: rgba(255, 154, 73, 0.32);
    background: rgba(255, 154, 73, 0.14);
    color: #ffe0bf;
}

.portal-ui-transaction-feed__content,
.portal-ui-transaction-feed__feedback {
    border-radius: 0.95rem;
    border: 1px solid var(--portal-border-soft, rgba(255, 255, 255, 0.14));
    background: linear-gradient(180deg, #151d2a 0%, #111825 100%);
    box-shadow: 0 12px 24px rgba(5, 10, 20, 0.2);
}

.portal-ui-transaction-feed__content {
    padding: 1rem;
}

.portal-ui-transaction-feed__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.portal-ui-transaction-feed__title {
    margin: 0;
    color: #edf3ff;
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-ui-transaction-feed__status {
    color: #9fb1ca;
    font-size: 0.84rem;
}

.portal-ui-transaction-feed__sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-ui-transaction-feed__section {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.portal-ui-transaction-feed__hour-group + .portal-ui-transaction-feed__hour-group {
    margin-top: 0.15rem;
    padding-top: 0.35rem;
}

.portal-ui-transaction-feed__hour-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 1rem 0.15rem;
    background: transparent;
    color: #f1d3aa;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.portal-ui-transaction-feed__hour-header::before {
    content: "";
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #ff9a49;
    box-shadow: 0 0 0 6px rgba(255, 154, 73, 0.12);
    flex: 0 0 auto;
}

.portal-ui-transaction-feed__items {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0.28rem 0.15rem 0.35rem;
    padding: 0;
    border: 1px solid var(--portal-border-soft, rgba(255, 255, 255, 0.14));
    border-radius: 0.9rem;
    overflow: hidden;
    background: rgba(15, 22, 32, 0.72);
}

.portal-ui-transaction-feed__item {
    padding: 0.64rem 0.82rem;
}

.portal-ui-transaction-feed__item + .portal-ui-transaction-feed__item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-ui-transaction-feed__item-layout {
    display: grid;
    grid-template-columns: minmax(92px, auto) minmax(72px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
}

.portal-ui-transaction-feed__stamp {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
}

.portal-ui-transaction-feed__time {
    color: #f7fbff;
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: "SFMono-Regular", "SF Mono", "Menlo", monospace;
}

.portal-ui-transaction-feed__id {
    color: #9cb1cf;
    font-size: 0.74rem;
    font-family: "SFMono-Regular", "SF Mono", "Menlo", monospace;
}

.portal-ui-transaction-feed__badge {
    align-self: start;
    justify-self: start;
    margin-top: 0.04rem;
}

.portal-ui-transaction-feed__main {
    min-width: 0;
    padding-right: 0.2rem;
}

.portal-ui-transaction-feed__headline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.portal-ui-transaction-feed__employee {
    color: #f5f8ff;
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    min-width: 0;
    line-height: 1.15;
}

.portal-ui-transaction-feed__meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem 0.62rem;
    margin-top: 0.14rem;
    color: #a8b8d0;
    font-size: 0.76rem;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.portal-ui-transaction-feed__meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-ui-transaction-feed__meta-separator {
    width: 0.18rem;
    height: 0.18rem;
    margin-top: 0.38rem;
    border-radius: 999px;
    background: rgba(166, 184, 213, 0.42);
    flex: 0 0 auto;
}

.portal-ui-transaction-feed__amount-wrap {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 110px;
    padding-left: 0.35rem;
}

.portal-ui-transaction-feed__amount {
    font-size: 0.9rem;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.portal-ui-transaction-feed__amount.positive {
    color: #eef4ff;
}

.portal-ui-transaction-feed__amount.negative {
    color: #ffb79a;
}

.portal-ui-transaction-feed__feedback {
    padding: 0.9rem 1rem;
    color: #d8e3f5;
}

.portal-ui-transaction-feed__feedback.is-hidden,
.portal-ui-transaction-feed__feedback.is-loading {
    display: none;
}

.portal-ui-transaction-feed__feedback.is-loading.is-visible {
    display: block;
}

.portal-ui-transaction-feed__empty {
    padding: 1.2rem 1rem;
    color: #a4b6cf;
}

.portal-ui-transaction-feed__filter-empty {
    display: none;
    padding: 1rem 0.15rem 0.25rem;
    color: #9fb1ca;
    font-size: 0.88rem;
}

.portal-ui-transaction-feed__filter-empty.is-visible {
    display: block;
}

.portal-ui-drawer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.portal-ui-drawer-layout--with-secondary {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr) minmax(300px, 0.9fr);
}

.portal-ui-drawer-layout__primary,
.portal-ui-drawer-layout__secondary,
.portal-ui-drawer-layout__drawer {
    min-width: 0;
}

.portal-ui-drawer-layout__drawer--sticky {
    position: sticky;
    top: 1rem;
}

.portal-ui-drawer-section {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(132, 147, 168, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.portal-ui-drawer-section--danger {
    border-color: rgba(255, 103, 79, 0.24);
    background: linear-gradient(180deg, rgba(79, 24, 20, 0.18) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.portal-ui-drawer-section__head {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 0.82rem;
}

.portal-ui-drawer-section__title {
    margin: 0;
    color: #f3f8ff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.portal-ui-drawer-section__subtitle {
    margin: 0;
    color: #8a9db8;
    font-size: 0.82rem;
    line-height: 1.45;
}

.portal-ui-linked-checklist {
    display: grid;
    gap: 0.72rem;
}

.portal-ui-linked-checklist__item {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.8rem 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(132, 147, 168, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.portal-ui-linked-checklist__checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.1rem;
}

.portal-ui-linked-checklist__copy {
    display: grid;
    gap: 0.26rem;
}

.portal-ui-linked-checklist__title {
    color: #eef4ff;
    font-size: 0.92rem;
    font-weight: 620;
    line-height: 1.35;
}

.portal-ui-linked-checklist__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    color: #8da1bc;
    font-size: 0.8rem;
}

.portal-ui-inline-action-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.portal-ui-inline-action-bar__field {
    flex: 1 1 auto;
    min-width: 0;
}

.portal-ui-inline-action-bar__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-ui-summary-stack {
    display: grid;
    gap: 0.75rem;
}

.portal-ui-summary-stack__item {
    display: grid;
    gap: 0.24rem;
    padding: 0.92rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(132, 147, 168, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.portal-ui-summary-stack__item--success {
    border-color: rgba(30, 199, 135, 0.24);
}

.portal-ui-summary-stack__item--warning {
    border-color: rgba(255, 176, 89, 0.26);
}

.portal-ui-summary-stack__item--danger {
    border-color: rgba(255, 103, 79, 0.26);
}

.portal-ui-summary-stack__label {
    color: #8ea2bc;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.portal-ui-summary-stack__value {
    color: #f6fbff;
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.25;
}

.portal-ui-summary-stack__meta {
    color: #889bb5;
    font-size: 0.8rem;
    line-height: 1.45;
}

.portal-ui-map-panel__canvas {
    /* Map surfaces should expand with the shared panel body instead of collapsing to content height. */
    height: 100%;
    min-height: 220px;
}

.portal-ui-panel--overlay .portal-ui-panel__title {
    color: #f2f7ff;
    letter-spacing: 0;
    font-size: 1.25rem;
    text-transform: none;
}

.portal-ui-panel--overlay .portal-ui-panel__subtitle {
    color: #92a6c1;
    font-size: 0.78rem;
}

.portal-ui-hero-summary,
.portal-ui-section-card {
    border-radius: var(--portal-ui-radius);
    border: 1px solid var(--portal-ui-border);
    color: var(--portal-ui-text);
}

.portal-ui-hero-summary {
    position: relative;
    overflow: hidden;
    padding: 1.18rem;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(255, 122, 0, 0.16) 0%, rgba(255, 122, 0, 0) 55%),
        linear-gradient(180deg, #171d27 0%, #121821 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.26);
}

.portal-ui-hero-summary + .portal-ui-section-card {
    /* Keep the first section card visually detached from the hero summary instead of letting borders touch. */
    margin-top: 1rem;
}

.portal-ui-hero-summary + .portal-ui-transaction-feed {
    /* Revenue transaction timelines start directly after the hero, so they need the same vertical rhythm as section cards. */
    margin-top: 1rem;
}

.portal-ui-hero-summary--live {
    border-color: rgba(255, 173, 96, 0.34);
    background:
        radial-gradient(130% 115% at 100% 0%, rgba(255, 122, 0, 0.22) 0%, rgba(255, 122, 0, 0) 60%),
        linear-gradient(180deg, #171d27 0%, #121821 100%);
}

.portal-ui-hero-summary__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.portal-ui-hero-summary__kicker {
    margin: 0 0 0.35rem;
    color: #8ea0bb;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
}

.portal-ui-hero-summary__title {
    margin: 0;
    /* Keep the hero title readable as context while the primary KPI remains the main visual focus. */
    font-size: clamp(1.05rem, 1.75vw, 1.35rem);
    font-weight: 700;
    color: #f4f8ff;
    line-height: 1.15;
}

.portal-ui-hero-summary__subtitle {
    margin: 0.32rem 0 0;
    color: #a9bad1;
    font-size: 0.9rem;
    font-weight: 560;
}

.portal-ui-hero-summary__metrics {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0.72rem;
    align-items: start;
}

.portal-ui-hero-summary__primary-metric {
    padding: 0.46rem 0 0.3rem;
}

.portal-ui-hero-summary__primary-label,
.portal-ui-hero-summary__secondary-label {
    margin: 0 0 0.28rem;
    color: #9aa9bf;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
}

.portal-ui-hero-summary__primary-value {
    margin: 0;
    color: #f8fbff;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    font-weight: 750;
    line-height: 1.04;
}

.portal-ui-hero-summary__value-stack {
    display: grid;
    gap: 0.34rem;
}

.portal-ui-hero-summary__secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    align-self: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-ui-hero-summary__secondary-metric {
    padding: 0.46rem 0.76rem;
}

.portal-ui-hero-summary__secondary-metric + .portal-ui-hero-summary__secondary-metric {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-ui-hero-summary__secondary-value {
    margin: 0;
    color: #eaf1ff;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 680;
    line-height: 1.15;
}

.portal-ui-hero-summary__primary-subvalue,
.portal-ui-hero-summary__secondary-subvalue {
    margin: 0.3rem 0 0;
    color: #99abc4;
    font-size: 0.78rem;
    font-weight: 500;
}

.portal-ui-hero-summary__body {
    margin-top: 1rem;
}

.portal-ui-status-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.portal-ui-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.68rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.portal-ui-status-pill--open {
    color: #6de0b2;
    border: 1px solid rgba(0, 199, 129, 0.4);
    background: rgba(0, 199, 129, 0.14);
}

.portal-ui-status-pill--closed {
    color: #d9e4f4;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(148, 163, 184, 0.2);
}

.portal-ui-status-pill--manual {
    color: #ffd9b0;
    border: 1px solid rgba(255, 122, 0, 0.46);
    background: rgba(255, 122, 0, 0.18);
}

.portal-ui-context-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 1rem;
}

.portal-ui-context-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.22rem 0.56rem;
    border-radius: 999px;
    border: 1px solid rgba(133, 151, 178, 0.28);
    background: rgba(133, 151, 178, 0.12);
    color: #b9c8dc;
    font-size: 0.76rem;
    line-height: 1.2;
}

.portal-ui-context-pill i {
    color: #d7e5f7;
    font-size: 0.72rem;
}

.portal-ui-context-pill__label {
    color: #dbe5f7;
    font-weight: 600;
}

.portal-ui-context-pill__value {
    color: #b9c8dc;
}

.portal-ui-split-metrics {
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(9, 14, 21, 0.42);
    padding: 0.8rem 0.85rem;
}

.portal-ui-split-metrics__legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.portal-ui-split-metrics__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
}

.portal-ui-split-metrics__item-label {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #e2ebf8;
    font-weight: 600;
}

.portal-ui-split-metrics__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    display: inline-block;
}

.portal-ui-split-metrics__dot--cash {
    background: #51d8a2;
}

.portal-ui-split-metrics__dot--card {
    background: #6ea5ff;
}

.portal-ui-split-metrics__item-value {
    white-space: nowrap;
    text-align: right;
    color: #eef4ff;
    font-weight: 700;
}

.portal-ui-split-metrics__item-value small {
    color: #93a4bb;
    font-weight: 600;
    margin-left: 0.35rem;
}

.portal-ui-split-metrics__track {
    width: 100%;
    display: flex;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.portal-ui-split-metrics__track-fill {
    height: 100%;
    flex: 0 0 auto;
}

.portal-ui-split-metrics__track-fill--cash {
    background: linear-gradient(90deg, #35c88f 0%, #6de0b2 100%);
    border-radius: 999px 0 0 999px;
}

.portal-ui-split-metrics__track-fill--card {
    background: linear-gradient(90deg, #4f8cff 0%, #81b3ff 100%);
    border-radius: 0 999px 999px 0;
}

.portal-ui-data-list {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.9rem;
}

.portal-ui-data-list__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin: 0 -0.42rem;
    padding: 0.62rem 0.42rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #d7e1ef;
    border-radius: 0.52rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.portal-ui-data-list__row:last-child {
    border-bottom: 0;
}

.portal-ui-data-list__label {
    color: #a8b8cc;
    font-weight: 500;
}

.portal-ui-data-list__value {
    color: #eef4ff;
    font-weight: 700;
    text-align: right;
}

.portal-ui-data-list__value--muted {
    color: #95a5bb;
    font-weight: 600;
}

.portal-ui-data-list__value--negative,
.portal-ui-data-list__value--danger {
    color: #ff7979;
}

.portal-ui-data-list__value--positive,
.portal-ui-data-list__value--success {
    color: #74f6ba;
}

.portal-ui-data-list__value--neutral,
.portal-ui-data-list__value--warning {
    color: #c8d5e8;
}

.portal-ui-section-card {
    padding: 1rem;
    background: linear-gradient(180deg, #151b25 0%, #111722 100%);
}

.portal-ui-section-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.portal-ui-section-card__title {
    margin: 0;
    color: #edf3ff;
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-ui-section-card__subtitle {
    margin: 0.25rem 0 0;
    color: #8ea0bb;
    font-size: 0.82rem;
}

.portal-ui-live-entity-card {
    width: 100%;
    min-width: 0;
}

.portal-ui-live-entity-card__link {
    display: inline-block;
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #1a212c 0%, #131a23 100%);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
    padding: 0.7em 0.85em;
    color: white !important;
    font-size: 1.2em;
    font-weight: 600;
    text-decoration: none !important;
}

.portal-ui-live-entity-card__link::before {
    content: "";
    position: absolute;
    inset: 0 46% auto 0;
    height: 1px;
    border-top-left-radius: 15px;
    background: linear-gradient(90deg, rgba(255, 173, 96, 0.72) 0%, rgba(255, 122, 0, 0) 100%);
}

.portal-ui-live-entity-card__title,
.portal-ui-live-entity-card__subtitle,
.portal-ui-live-entity-card__tickets,
.portal-ui-live-entity-card__amount,
.portal-ui-live-entity-card__last-transaction {
    position: absolute;
}

.portal-ui-live-entity-card__title {
    top: 0.7em;
    left: 0.85em;
    right: 5.8em;
    line-height: 1.05;
}

.portal-ui-live-entity-card__subtitle {
    top: 2.45em;
    left: 0.85em;
    right: 0.85em;
    color: rgba(236, 241, 251, 0.7);
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.1;
}

.portal-ui-live-entity-card__tickets {
    top: 0.9em;
    right: 0.85em;
    color: rgba(236, 241, 251, 0.85);
    font-size: 0.9em;
    font-weight: 400;
}

.portal-ui-live-entity-card__tickets i {
    margin-right: 0.2em;
}

.portal-ui-live-entity-card__amount {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff9f42;
    font-size: 1.9em;
    font-weight: 650;
    text-shadow: 0 2px 10px rgba(255, 122, 0, 0.2);
}

.portal-ui-live-entity-card__last-transaction {
    left: 50%;
    bottom: 0.85em;
    transform: translate(-50%, 0);
    width: 100%;
    text-align: center;
    font-size: 0.8em;
    font-weight: 400;
    opacity: 0.76;
}

.portal-ui-live-entity-card__link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 173, 96, 0.45);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.46);
}

@media (hover: hover) and (pointer: fine) {
    .portal-ui-data-list__row:hover {
        background: rgba(255, 255, 255, 0.045);
        border-bottom-color: rgba(255, 255, 255, 0.16);
    }
}

@media (max-width: 991.98px) {
    .portal-ui-hero-summary__metrics,
    .portal-ui-hero-summary__secondary-grid,
    .portal-ui-split-metrics__legend {
        grid-template-columns: 1fr;
    }

    .portal-ui-hero-summary__secondary-metric + .portal-ui-hero-summary__secondary-metric {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .portal-ui-section-card__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-ui-form-section-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-ui-entity-row,
    .portal-ui-entity-row--employee {
        grid-template-columns: 1fr;
    }

    .portal-ui-entity-row__trailing {
        text-align: left;
        min-width: 0;
    }

    .portal-ui-entity-row__trailing--actions,
    .portal-ui-entity-row__action-group {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .portal-ui-entity-row--event .portal-ui-entity-row__title {
        font-size: 1.18rem;
    }

    .portal-ui-disclosure-panel__button {
        flex-wrap: wrap;
    }

    .portal-ui-disclosure-panel__summary {
        margin-left: 0;
    }

    .portal-ui-drawer-layout,
    .portal-ui-drawer-layout--with-secondary {
        grid-template-columns: 1fr;
    }

    .portal-ui-drawer-layout__drawer--sticky {
        position: static;
        top: auto;
    }

    .portal-ui-inline-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-ui-inline-action-bar__actions {
        justify-content: flex-end;
    }
}

@media (max-width: 767.98px) {
    .portal-ui-header {
        flex-direction: column;
    }

    .portal-ui-header__title-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .portal-ui-header__actions {
        margin-left: 0;
    }

    .portal-ui-panel__header {
        flex-direction: column;
    }

    .portal-ui-status-pills {
        justify-content: flex-start;
    }

    .portal-ui-data-list__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .portal-ui-data-list__value,
    .portal-ui-split-metrics__item-value {
        text-align: left;
        white-space: normal;
    }

    .portal-ui-transaction-feed__item-layout {
        grid-template-columns: 1fr;
        align-items: flex-start;
        gap: 0.34rem;
    }

    .portal-ui-transaction-feed__items {
        margin-left: 0.1rem;
        margin-right: 0.1rem;
        margin-bottom: 0.3rem;
    }

    .portal-ui-transaction-feed__amount-wrap {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
        padding-left: 0;
        padding-top: 0.12rem;
    }

    .portal-ui-transaction-feed__search {
        width: 100%;
    }

    .portal-ui-empty-state {
        padding: 2rem 1.1rem;
    }
}
