/* Hostport UI component library.
   Shared Hp* component structure (page header, card, stat card, empty state,
   section) lives in the Ui Razor Class Library (_content/Ui/hp-ui.css) —
   only Hostport-specific components and this portal's token VALUES stay here. */

.hp-deployment-section {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: var(--hp-surface-raised);
}

.hp-data-table-wrap {
    overflow-x: auto;
}

.hp-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.hp-data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hp-text-muted);
    border-bottom: 1px solid var(--hp-border-subtle);
    white-space: nowrap;
}

.hp-data-table td {
    padding: 0.85rem 1rem;
    color: var(--hp-text);
    border-bottom: 1px solid var(--hp-border-subtle);
    vertical-align: middle;
}

.hp-data-table tbody tr:last-child td {
    border-bottom: none;
}

.hp-data-table tbody tr:hover {
    background: var(--hp-surface-overlay);
}

.hp-data-table .hp-data-table-actions {
    text-align: right;
    white-space: nowrap;
}

.hp-data-table .hp-data-table-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
}

.hp-credit-highlight {
    background: var(--hp-gradient-primary);
    color: var(--hp-text);
    border-color: rgba(110, 146, 192, 0.45);
}

.hp-credit-highlight .hp-stat-card-label,
.hp-credit-highlight .hp-stat-card-value {
    color: var(--hp-text);
}

.hp-credit-highlight .hp-stat-card-label {
    opacity: 0.9;
}

.hp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
    border: 1px solid transparent;
}

.hp-member-you-badge {
    margin-left: 0.5rem;
}

.hp-badge-primary {
    color: var(--hp-primary-accent);
    background: var(--hp-primary-muted);
    border-color: rgba(110, 146, 192, 0.35);
}

.hp-badge-success {
    color: var(--hp-success);
    background: rgba(93, 191, 116, 0.16);
    border-color: rgba(93, 191, 116, 0.3);
}

.hp-badge-warning {
    color: var(--hp-warning);
    background: rgba(250, 193, 82, 0.16);
    border-color: rgba(250, 193, 82, 0.3);
}

.hp-badge-info {
    color: var(--hp-primary-accent);
    background: var(--hp-primary-muted);
    border-color: rgba(110, 146, 192, 0.35);
}

.hp-badge-danger {
    color: var(--hp-danger);
    background: rgba(249, 119, 127, 0.16);
    border-color: rgba(249, 119, 127, 0.3);
}

.hp-badge-neutral {
    color: var(--hp-text-secondary);
    background: rgba(148, 163, 184, 0.12);
    border-color: var(--hp-border-subtle);
}

.hp-dashboard-tile {
    text-align: center;
    padding: 1.5rem;
}

.hp-dashboard-tile-icon {
    font-size: 3rem;
    color: var(--hp-primary-accent);
    line-height: 1;
}

.hp-dashboard-tile-title {
    margin: 1rem 0 0.35rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-dashboard-tile-description {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--hp-text-muted);
}

.hp-section-header-bar {
    padding: 0.75rem 1rem;
    background: var(--hp-surface-raised);
    border-bottom: 1px solid var(--hp-border-subtle);
}

.hp-code-snippet {
    margin: 0;
    padding: 0.875rem 1rem;
    background: var(--hp-bg-base);
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--hp-text-secondary);
}

.hp-icon-primary {
    color: var(--hp-primary-accent);
}

.hp-icon-muted {
    color: var(--hp-text-muted);
}

.hp-icon-success {
    color: var(--hp-success);
}

.hp-icon-xs {
    font-size: 0.75rem !important;
}

.hp-icon-sm {
    font-size: 0.9rem;
}

.hp-icon-md {
    font-size: 1.5rem;
}

.hp-icon-lg {
    font-size: 2rem;
}

.hp-icon-xl {
    font-size: 2.5rem;
}

.hp-icon-xxl {
    font-size: 3rem;
}

.hp-icon-display {
    font-size: 4rem;
}

.hp-subnav-layout {
    display: flex;
    height: 100%;
    gap: 0;
}

.hp-subnav-sidebar {
    width: 250px;
    flex-shrink: 0;
    height: 100%;
    padding: 0;
    border-right: 1px solid var(--hp-border-subtle);
    border-radius: 0;
}

.hp-subnav-sidebar .rz-panel-menu {
    height: 100%;
    border: none;
}

.hp-subnav-content {
    flex: 1;
    /* No padding: .main-content already applies the page inset once. Adding it again here put
       Account/Organization/Domains 1.5rem deeper than every other nav destination, so the content
       edge shifted on each navigation. */
    padding: 0 0 0 1.5rem;
    overflow: auto;
    height: 100%;
    min-width: 0;
}

.hp-danger-zone {
    border: 1px solid rgba(249, 119, 127, 0.35);
    background: rgba(249, 119, 127, 0.08);
}

.hp-text-danger {
    color: var(--hp-danger);
}

.hp-text-warning {
    color: var(--hp-warning);
}

.hp-text-success {
    color: var(--hp-success);
}

.hp-list-indented {
    margin-left: 1.25rem;
    margin-bottom: 0;
}

.hp-muted-surface {
    background: var(--hp-surface-raised);
}

.hp-template-card {
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    border: 2px solid transparent;
    min-height: 200px;
}

.hp-template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hp-shadow);
}

.hp-template-card.hp-template-card-selected {
    border-color: var(--hp-primary);
    background: var(--hp-primary-muted);
}

.hp-filter-badge {
    cursor: pointer;
}

.hp-filter-badge.hp-filter-badge-active {
    box-shadow: 0 0 0 2px rgba(110, 146, 192, 0.35);
}

.hp-deploy-card {
    transition: all 0.3s ease;
}

.hp-deploy-card-status-failed {
    border-left: 4px solid var(--hp-danger);
}

.hp-deploy-card-status-success {
    border-left: 4px solid var(--hp-success);
}

.hp-deploy-card-status-warning {
    border-left: 4px solid var(--hp-warning);
}

.hp-deploy-card-status-info {
    border-left: 4px solid var(--hp-primary-accent);
}

.hp-deploy-icon {
    font-size: 1.5rem;
}

.hp-deploy-icon-failed {
    color: var(--hp-danger);
}

.hp-deploy-icon-success {
    color: var(--hp-success);
}

.hp-deploy-icon-warning {
    color: var(--hp-warning);
    animation: hp-pulse 2s infinite;
}

.hp-deploy-icon-info {
    color: var(--hp-primary-accent);
}

.hp-stack-compose {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0.75rem;
}

.hp-stack-dialog-body {
    padding: 0 0.15rem;
}

.hp-stack-inline-error {
    margin-top: 0.5rem;
}

.hp-stack-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hp-stack-section-head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hp-stack-section-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--hp-text);
}

.hp-stack-section-lead {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--hp-text-muted);
}

.hp-stack-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 700px) {
    .hp-stack-setup-grid {
        grid-template-columns: 1fr;
    }
}

.hp-stack-combobox {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 36rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hp-stack-combobox:focus-within {
    border-color: var(--hp-primary);
    box-shadow: var(--hp-focus-ring);
}

.hp-stack-combobox-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.75rem;
    color: var(--hp-text-muted);
    pointer-events: none;
}

.hp-stack-combobox-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem 0.5rem 0.85rem 0;
    border: none;
    background: transparent;
    color: var(--hp-text);
    font-size: 0.9375rem;
    line-height: 1.4;
    outline: none;
}

.hp-stack-combobox-input::placeholder {
    color: var(--hp-text-muted);
}

.hp-stack-combobox-input::-webkit-search-cancel-button {
    display: none;
}

.hp-stack-combobox-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.25rem;
    margin-inline-end: 0.35rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--hp-text-muted);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.hp-stack-combobox-clear:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hp-text);
}

.hp-stack-combobox-panel {
    position: absolute;
    z-index: 30;
    inset-inline: 0;
    inset-block-start: calc(100% + 0.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.4rem;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface-raised);
    box-shadow: var(--hp-shadow);
}

.hp-stack-combobox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: none;
    border-radius: var(--hp-radius-sm);
    background: transparent;
    color: var(--hp-text);
    text-align: start;
    cursor: pointer;
    transition: background 0.12s ease;
}

.hp-stack-combobox-option:hover {
    background: var(--hp-primary-muted);
}

.hp-stack-combobox-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.hp-stack-combobox-option-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.hp-stack-combobox-option-meta {
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
}

.hp-stack-combobox-option-add {
    flex: 0 0 auto;
    font-size: 1.125rem !important;
    color: var(--hp-primary-accent);
    opacity: 0.7;
    transition: opacity 0.12s ease;
}

.hp-stack-combobox-option:hover .hp-stack-combobox-option-add {
    opacity: 1;
}

.hp-stack-combobox-empty {
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
    color: var(--hp-text-muted);
    text-align: center;
}

.hp-stack-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--hp-border);
    border-radius: var(--hp-radius);
    background: rgba(255, 255, 255, 0.015);
    text-align: center;
}

.hp-stack-empty-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--hp-primary-muted);
    color: var(--hp-primary-accent);
    font-size: 1.5rem;
}

.hp-stack-empty-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-stack-empty-text {
    margin: 0;
    max-width: 26rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--hp-text-muted);
}

.hp-stack-quickpicks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    max-width: 34rem;
}

.hp-stack-quickpick {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: 999px;
    background: var(--hp-surface);
    color: var(--hp-text);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.hp-stack-quickpick:hover {
    border-color: var(--hp-primary);
    background: var(--hp-primary-muted);
}

.hp-stack-quickpick-add {
    font-size: 1rem !important;
    color: var(--hp-primary-accent);
}

.hp-stack-service-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hp-stack-service-card {
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%);
    overflow: hidden;
    box-shadow: var(--hp-shadow-sm);
}

.hp-stack-service-card--web {
    border-inline-start: 3px solid var(--hp-primary);
}

.hp-stack-service-card--db {
    border-inline-start: 3px solid var(--hp-success);
}

.hp-stack-service-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease;
}

.hp-stack-service-head:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hp-stack-service-titles {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.hp-stack-service-name {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--hp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-stack-service-summary {
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-stack-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.hp-stack-status .rzi {
    font-size: 0.9375rem;
}

.hp-stack-status--ok {
    background: rgba(93, 191, 116, 0.14);
    color: var(--hp-success);
}

.hp-stack-status--warn {
    background: rgba(230, 176, 92, 0.16);
    color: var(--hp-warning);
}

.hp-stack-status--busy {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hp-text-muted);
}

.hp-stack-chevron {
    flex: 0 0 auto;
    color: var(--hp-text-muted);
    transition: transform 0.15s ease;
}

.hp-stack-chevron.is-open {
    transform: rotate(180deg);
}

.hp-stack-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--hp-text-muted);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.hp-stack-icon-btn:hover {
    background: rgba(249, 119, 127, 0.12);
    color: var(--hp-danger);
}

.hp-stack-service-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.15rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-stack-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

@media (max-width: 900px) {
    .hp-stack-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .hp-stack-field-grid {
        grid-template-columns: 1fr;
    }
}

.hp-stack-subsection {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-stack-subsection-title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hp-text-muted);
}

.hp-stack-advanced-prompt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.hp-stack-field-hint {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.hp-stack-field-hint--error {
    color: var(--hp-danger);
}

.hp-stack-kind-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hp-stack-kind-web {
    background: rgba(110, 146, 192, 0.22);
    color: var(--hp-primary-accent);
}

.hp-stack-kind-db {
    background: rgba(93, 191, 116, 0.16);
    color: var(--hp-success);
}

.hp-stack-connections {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hp-stack-connection-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.hp-stack-connection-app {
    flex: 0 0 auto;
    min-width: 8rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-stack-connection-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1 1 auto;
}

.hp-stack-connection-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.8125rem;
    color: var(--hp-text-secondary);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.hp-stack-connection-chip.is-active {
    border-color: rgba(93, 191, 116, 0.45);
    background: rgba(93, 191, 116, 0.1);
    color: var(--hp-text);
}

.hp-stack-review-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    overflow: hidden;
}

.hp-stack-review-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
}

.hp-stack-review-row + .hp-stack-review-row {
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-stack-review-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
    min-width: 0;
}

.hp-stack-review-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-stack-review-meta {
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
}

.hp-stack-review-links {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: var(--hp-success);
}

.hp-stack-review-links .rzi {
    font-size: 0.9375rem;
}

.hp-stack-review-cost {
    flex: 0 0 auto;
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--hp-text);
    white-space: nowrap;
}

.hp-stack-summary-card {
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow-sm);
}

.hp-stack-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-stack-summary-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hp-stack-summary-total {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--hp-text);
}

.hp-stack-summary-ack {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--hp-border-subtle);
    font-size: 0.875rem;
    color: var(--hp-text-secondary);
    cursor: pointer;
}

.hp-stack-payload {
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
}

.hp-stack-payload > summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    font-size: 0.875rem;
    color: var(--hp-text-secondary);
    cursor: pointer;
    user-select: none;
}

.hp-stack-payload > summary .rzi {
    font-size: 1.05rem;
    color: var(--hp-text-muted);
}

.hp-stack-payload-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0 1.1rem 1.1rem;
}

.hp-stack-json-preview {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: var(--hp-bg-deepest);
    color: var(--hp-text-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow: auto;
    max-height: 32rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@keyframes hp-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .hp-page-header-title {
        font-size: 1.5rem;
    }

    .hp-page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Header navigation */

.hp-text-muted {
    color: var(--hp-text-muted);
}

.hp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--hp-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hp-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.hp-nav-link:hover,
.hp-nav-link:focus-visible {
    color: var(--hp-text);
    background: rgba(255, 255, 255, 0.06);
}

.hp-nav-link.active {
    color: var(--hp-primary-accent);
    background: rgba(110, 146, 192, 0.22);
    box-shadow: inset 0 0 0 1px rgba(110, 146, 192, 0.45);
}

.hp-nav-dropdown-trigger.active,
.hp-nav-dropdown-open .hp-nav-dropdown-trigger {
    color: var(--hp-primary-accent);
    background: rgba(110, 146, 192, 0.22);
    box-shadow: inset 0 0 0 1px rgba(110, 146, 192, 0.45);
}

.hp-nav-link-accent {
    color: var(--hp-primary-accent);
}

.hp-nav-link-accent.active,
.hp-nav-link-accent:hover {
    color: var(--hp-text);
    background: rgba(110, 146, 192, 0.28);
}

.hp-nav-link .rzi {
    font-size: 1.1rem;
    opacity: 0.9;
}

.hp-nav-chevron {
    font-size: 1rem !important;
    opacity: 0.7;
    transition: transform 0.15s ease;
}

.hp-nav-dropdown {
    position: relative;
    z-index: 1;
}

.hp-nav-dropdown-open {
    z-index: 1201;
}

.hp-nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 11rem;
    margin-top: 0.35rem;
    padding: 0.35rem;
    background: var(--hp-surface-overlay);
    border: 1px solid rgba(110, 146, 192, 0.45);
    border-radius: var(--hp-radius-sm);
    box-shadow: var(--hp-shadow);
    z-index: 1202;
    pointer-events: auto;
}

.hp-nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    left: 0;
    right: 0;
    height: 0.35rem;
}

.hp-nav-dropdown-open .hp-nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hp-nav-dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1198;
    background: transparent;
    pointer-events: auto;
}

.hp-nav-dropdown-open .hp-nav-chevron {
    transform: rotate(180deg);
}

.hp-nav-group-label {
    display: none;
    padding: 0.5rem 0.85rem 0.2rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hp-text-muted);
}

.hp-nav-divider {
    display: none;
    height: 1px;
    margin: 0.35rem 0.5rem;
    background: var(--hp-border-subtle);
}

.hp-nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--hp-text);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.hp-nav-dropdown-link:hover,
.hp-nav-dropdown-link.active {
    color: var(--hp-text);
    background: rgba(110, 146, 192, 0.28);
    box-shadow: inset 0 0 0 1px rgba(110, 146, 192, 0.4);
}

.hp-nav-dropdown-link.active {
    color: var(--hp-primary-accent);
}

@media (max-width: 1024px) {
    .hp-nav-group-label,
    .hp-nav-divider {
        display: block;
    }

    .hp-nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 0.85rem;
    }

    .hp-nav-dropdown {
        width: 100%;
    }

    .hp-nav-dropdown-trigger {
        width: 100%;
        justify-content: flex-start;
    }

    .hp-nav-dropdown-menu {
        position: static;
        display: none;
        margin-top: 0.25rem;
        box-shadow: none;
        border: 1px solid var(--hp-border-subtle);
        background: var(--hp-surface-overlay);
        padding: 0.35rem;
    }

    .hp-nav-dropdown-open .hp-nav-dropdown-menu {
        display: flex;
    }
}

/* Header actions (organization, account) */

.hp-header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--hp-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hp-header-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hp-text);
    border-color: var(--hp-border);
}

.hp-header-action-chevron {
    font-size: 1rem !important;
    opacity: 0.7;
}

.hp-header-dropdown {
    min-width: 11rem;
}



.hp-header-tenant {
    display: flex;
    align-items: center;
}




.account-menu {
    position: relative;
    z-index: 1200;
}

.account-menu-card {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(320px, calc(100vw - 2rem));
    max-height: min(80vh, 640px);
    overflow-y: auto;
    z-index: 1201;
}

.account-menu-section {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.account-menu-section-last {
    margin-bottom: 0;
}

.account-menu-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hp-text-muted);
    margin-bottom: 0.5rem;
}

.account-menu-hint {
    font-size: 0.75rem;
    color: var(--hp-text-muted);
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.account-menu-empty {
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
    margin: 0 0 0.5rem;
}

.account-menu-org-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.35rem;
}

.account-menu-org-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--hp-text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.account-menu-org-item:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hp-text);
}

.account-menu-org-item:disabled {
    cursor: default;
    opacity: 1;
}

.account-menu-org-item-active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--hp-primary-accent);
}

.account-menu-org-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-org-check {
    font-size: 1rem !important;
    color: var(--hp-primary-accent);
}

.account-menu-section-actions {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hp-dropdown-action-compact {
    padding: 0.4rem 0.55rem;
    font-size: 0.8125rem;
}

.hp-org-switcher {
    position: relative;
    z-index: 1200;
}

.hp-org-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.8125rem;
    color: var(--hp-text-secondary);
    max-width: 14rem;
}

.hp-org-chip-loading {
    width: 6rem;
    height: 1.75rem;
    border-radius: var(--hp-radius-sm);
    background: rgba(255, 255, 255, 0.06);
}

.hp-org-chip-icon {
    font-size: 1rem !important;
    opacity: 0.75;
}

.hp-org-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--hp-text);
}

.hp-org-chip-status {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.hp-org-chip-status-active {
    background: var(--hp-success, #34d399);
}

.hp-org-chip-status-warning {
    background: var(--hp-warning, #fbbf24);
}

.hp-org-chip-status-danger {
    background: var(--hp-danger);
}

.hp-org-chip-status-muted {
    background: var(--hp-text-muted);
}

.hp-billing-relationship-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--hp-radius-sm);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.8125rem;
    color: var(--hp-text-secondary);
}

.hp-billing-section-intro {
    margin-bottom: 0.75rem;
}


.account-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1199;
}

.account-menu-user {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--hp-border-subtle);
    margin-bottom: 0.75rem;
}

.account-menu-name {
    font-weight: 600;
    word-break: break-word;
    color: var(--hp-text);
    font-size: 0.9375rem;
}

.account-menu-email {
    color: var(--hp-text-muted);
    word-break: break-all;
    font-size: 0.8125rem;
    margin-top: 0.15rem;
}

.account-menu-meta {
    color: var(--hp-text-muted);
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    margin-top: 0.35rem;
}

.account-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hp-dropdown-panel {
    background: var(--hp-surface-raised);
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius-sm);
    box-shadow: var(--hp-shadow);
    padding: 0.85rem;
}

.hp-dropdown-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--hp-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.hp-dropdown-action:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--hp-text);
}

.hp-dropdown-action-danger {
    color: var(--hp-danger);
}

.hp-dropdown-action-danger:hover {
    background: rgba(249, 119, 127, 0.12);
    color: var(--hp-danger);
}

/* Wizard flows (RadzenSteps) */

.hp-wizard-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: linear-gradient(165deg, var(--hp-surface-raised) 0%, var(--hp-surface) 100%);
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    padding: 1.25rem;
    box-shadow: var(--hp-shadow-sm);
    box-sizing: border-box;
}

.hp-wizard-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.hp-wizard-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem -1.25rem -1.25rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--hp-border);
    background: var(--hp-surface);
    box-sizing: border-box;
}

.rz-dialog.hp-wizard-dialog .hp-wizard-footer {
    background: var(--hp-surface-raised);
}

.hp-wizard-panel.rz-card {
    background: linear-gradient(165deg, var(--hp-surface-overlay) 0%, var(--hp-surface-raised) 100%);
    border: 1px solid var(--hp-border-subtle);
    box-shadow: none;
}

.hp-wizard-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.hp-wizard-page {
    min-height: min(70vh, 720px);
}

/* Checklist panel above the wizard footer explaining a disabled Next/Create button */

.hp-wizard-blockers {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(230, 176, 92, 0.35);
    border-radius: var(--hp-radius);
    background: rgba(230, 176, 92, 0.07);
}

.hp-wizard-blockers-icon {
    color: var(--hp-warning);
    margin-top: 0.1rem;
}

.hp-wizard-blockers-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.hp-wizard-blockers-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-wizard-blockers-body ul {
    margin: 0;
    padding-inline-start: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--hp-text-secondary);
}

.hp-wizard-shell ::deep .rz-steps {
    margin-bottom: 1.25rem;
}

.hp-wizard-shell ::deep .rz-steps-buttons {
    display: none;
}

.hp-wizard-shell ::deep .rz-steps-title {
    color: var(--hp-text-muted);
}

.hp-wizard-shell ::deep .rz-steps-item.rz-state-highlight .rz-steps-number {
    background: var(--hp-gradient-primary);
    border-color: var(--hp-primary);
}

.hp-wizard-shell ::deep .rz-steps-item.rz-state-highlight .rz-steps-title {
    color: var(--hp-primary-accent);
}

.hp-wizard-shell ::deep .rz-selectbar-item.rz-state-active {
    background: var(--hp-primary-muted);
    border-color: var(--hp-primary);
    color: var(--hp-primary-accent);
}

.rz-dialog.hp-wizard-dialog {
    width: min(60vw, 900px) !important;
    height: min(70vh, 800px) !important;
    max-width: min(60vw, 900px);
    max-height: min(70vh, 800px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-color: var(--hp-border);
    box-shadow: var(--hp-shadow);
}

.rz-dialog.hp-wizard-dialog.hp-wide-dialog {
    width: min(94vw, 1200px) !important;
    height: min(92vh, 900px) !important;
    max-width: min(94vw, 1200px);
    max-height: min(92vh, 900px);
}

.rz-dialog.hp-wizard-dialog .rz-dialog-titlebar {
    flex: 0 0 auto;
    border-block-end: 1px solid var(--hp-border-subtle);
}

.rz-dialog.hp-wizard-dialog .rz-dialog-content,
.rz-dialog.hp-wizard-dialog .hp-wizard-dialog-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rz-dialog.hp-wizard-dialog .hp-wizard-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Dashboard grid */

.hp-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* Page stack spacing */

.hp-page-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Reading measure for stacked form pages. Centred, or the cap would just leave the form pinned
   to the left edge of the 1440px shell. Not for pages built on data grids — squeezing a table to
   640px is worse than letting it use the shell width. */
.hp-page-narrow {
    max-width: 640px;
    margin-inline: auto;
}

.hp-page-account {
    max-width: 880px;
}

.hp-account-hub {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
}

.hp-account-stat-row,
.hp-stat-row {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.hp-stat-row > .hp-stat-card {
    height: 100%;
}

.hp-billing-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.25rem 0 0.5rem;
}

.hp-billing-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.hp-billing-filter-project {
    margin-left: auto;
    flex: 0 1 12rem;
}

@media (max-width: 640px) {
    .hp-billing-filter-project {
        margin-left: 0;
        flex: 1 1 100%;
        width: 100%;
    }
}

.hp-billing-history-filter {
    align-items: flex-end;
}

.hp-billing-history-month,
.hp-billing-history-sort {
    min-width: 10rem;
    flex: 0 1 12rem;
}

.hp-billing-table-wrap {
    overflow-x: auto;
}

.hp-billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.hp-billing-table th,
.hp-billing-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--hp-border-subtle, rgba(0, 0, 0, 0.08));
    text-align: left;
    vertical-align: top;
}

.hp-billing-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hp-text-muted);
    background: var(--hp-surface-muted);
}

.hp-billing-table-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hp-billing-table-meta {
    font-size: 0.75rem;
    color: var(--hp-text-muted);
}

.hp-billing-service-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.hp-webapp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.hp-webapp-list-card {
    height: 100%;
}

.hp-detail-tabs .rz-tabview-panel {
    padding: 0;
}

.hp-portal-browser-card {
    overflow: hidden;
}

.hp-portal-browser-toolbar {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--hp-border-subtle);
    background: linear-gradient(180deg, var(--hp-surface-raised) 0%, var(--hp-surface) 100%);
}

.hp-detail-tab-content {
    padding: 1.25rem 1.5rem;
}

.hp-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem 1.5rem;
}

.hp-config-item-label {
    font-size: 0.75rem;
    color: var(--hp-text-muted);
    margin: 0 0 0.25rem;
}

.hp-config-item-value {
    font-size: 0.9375rem;
    color: var(--hp-text);
    margin: 0;
    word-break: break-word;
}

.hp-config-item-value.hp-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
}

.hp-config-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* Resource detail shell */

.hp-detail-topbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Compact billing plan card */

.hp-plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-plan-card-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1 1 16rem;
}

.hp-plan-card-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hp-plan-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-plan-card-caps {
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
}

.hp-plan-card-side {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.hp-plan-card-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hp-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hp-plan-card-price-period {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--hp-text-muted);
    margin-left: 0.15rem;
}

.hp-plan-card-extra {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.hp-account-nav-card {
    height: 100%;
}

.hp-inline-legal-nav {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.hp-inline-legal-nav ::deep .rz-link {
    color: var(--hp-text-muted);
    text-decoration: none;
}

.hp-inline-legal-nav ::deep .rz-link:hover {
    color: var(--hp-primary-accent);
}

.hp-inline-legal-nav-sep {
    color: var(--hp-text-muted);
    opacity: 0.55;
    user-select: none;
}

.hp-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--hp-border-subtle);
}

.hp-account-row:last-child {
    border-bottom: none;
}

.hp-account-row-label {
    color: var(--hp-text-muted);
    font-size: 0.8125rem;
}

.hp-account-row-value {
    font-weight: 500;
    margin-top: 0.15rem;
}

/* Subnav polish */

.hp-subnav-sidebar.hp-card {
    background: linear-gradient(180deg, var(--hp-surface-raised) 0%, var(--hp-surface) 100%);
}

.hp-subnav-sidebar ::deep .rz-panel-menu-item-link {
    border-radius: 6px;
    margin: 0.15rem 0.5rem;
}

.hp-subnav-sidebar ::deep .rz-panel-menu-item-link.rz-state-active {
    background: var(--hp-primary-muted);
    color: var(--hp-primary-accent);
}


.hp-workflow-drawer-toggle {
    position: fixed;
    right: 0;
    top: calc(50% - 2.75rem);
    transform: translateY(-50%) translateX(calc(100% - 38px));
    z-index: 1090;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    border: 1px solid var(--hp-border);
    border-right: none;
    border-radius: var(--hp-radius) 0 0 var(--hp-radius);
    background: var(--hp-surface-raised);
    color: var(--hp-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--hp-shadow-sm);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.hp-workflow-drawer-toggle:hover {
    transform: translateY(-50%) translateX(0);
    background: var(--hp-surface-overlay);
    color: var(--hp-text);
    border-color: var(--hp-primary);
    box-shadow: var(--hp-shadow);
}

.hp-workflow-drawer-toggle.active {
    color: var(--hp-primary-accent);
    background: rgba(110, 146, 192, 0.22);
    border-color: rgba(110, 146, 192, 0.45);
    box-shadow: inset 0 0 0 1px rgba(110, 146, 192, 0.45);
}

.hp-workflow-drawer-toggle .rzi {
    font-size: 1.15rem;
    opacity: 0.9;
}

.hp-drawer-portal {
    display: contents;
}

.hp-drawer-dialog {
    outline: none;
}

.hp-workflow-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
}

.hp-workflow-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    z-index: 1310;
    background: var(--hp-surface-overlay);
    border-left: 1px solid var(--hp-border);
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    box-shadow: var(--hp-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.hp-workflows-page {
    gap: 1.75rem;
}

.hp-workflow-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hp-border-subtle);
}

.hp-workflow-drawer-loading,
.hp-workflow-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    gap: 0.75rem;
    border: 1px dashed var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.hp-workflow-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hp-workflow-card {
    background: var(--hp-surface-raised);
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hp-workflow-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0.75rem;
}

.hp-workflow-card-top {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
}

.hp-workflow-card:hover {
    border-color: var(--hp-primary-light);
    box-shadow: var(--hp-shadow-md);
    transform: translateY(-1px);
}

.hp-workflow-highlight {
    border-color: var(--hp-primary);
    box-shadow: 0 0 0 1px var(--hp-primary);
}

.hp-workflow-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hp-workflow-title {
    color: var(--hp-text);
    font-weight: 600;
}

.hp-workflow-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
    margin-top: -0.2rem;
    color: var(--hp-text-muted);
}

.hp-workflow-card-meta .rzi {
    font-size: 0.85rem !important;
}

.hp-workflow-stages-region {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-workflow-stages-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.hp-workflow-stages-more {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.6rem;
    border: none;
    border-radius: var(--hp-radius-sm);
    background: transparent;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--hp-text-muted);
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

button.hp-workflow-stages-more:hover {
    color: var(--hp-primary-accent);
    background: rgba(255, 255, 255, 0.04);
}

.hp-workflow-stage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--hp-radius-sm);
    transition: background 0.15s ease;
}

.hp-workflow-stage:hover {
    background: rgba(255, 255, 255, 0.06);
}

.hp-workflow-stage-name {
    color: var(--hp-text-secondary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-workflow-stage-link {
    color: var(--hp-primary-accent);
    text-decoration: none;
    font-weight: 500;
}

.hp-workflow-stage-link:hover {
    text-decoration: underline;
}

.hp-badge-compact {
    padding: 0.1rem 0.45rem;
    font-size: 0.6875rem;
    border-radius: 4px;
    font-weight: 600;
}

.hp-workflow-card-summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--hp-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: -0.25rem;
    min-width: 0;
}

.hp-workflow-card-summary > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-workflow-drawer-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hp-workflow-drawer-all-link {
    font-size: 0.8125rem;
}

.hp-feedback-drawer-toggle {
    position: fixed;
    right: 0;
    top: calc(50% + 2.75rem);
    transform: translateY(-50%) translateX(calc(100% - 38px));
    z-index: 1090;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    border: 1px solid var(--hp-border);
    border-right: none;
    border-radius: var(--hp-radius) 0 0 var(--hp-radius);
    background: var(--hp-surface-raised);
    color: var(--hp-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--hp-shadow-sm);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.hp-feedback-drawer-toggle:hover {
    transform: translateY(-50%) translateX(0);
    background: var(--hp-surface-overlay);
    color: var(--hp-text);
    border-color: var(--hp-primary);
    box-shadow: var(--hp-shadow);
}

.hp-feedback-drawer-toggle.active {
    color: var(--hp-primary-accent);
    background: rgba(110, 146, 192, 0.22);
    border-color: rgba(110, 146, 192, 0.45);
    box-shadow: inset 0 0 0 1px rgba(110, 146, 192, 0.45);
}

.hp-feedback-drawer-toggle .rzi {
    font-size: 1.15rem;
    opacity: 0.9;
}

.hp-feedback-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.hp-feedback-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    z-index: 1310;
    background: var(--hp-surface-overlay);
    border-left: 1px solid var(--hp-border);
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    box-shadow: var(--hp-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.hp-feedback-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hp-border-subtle);
}

.hp-feedback-drawer-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hp-feedback-drawer-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-feedback-drawer-loading {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.hp-feedback-report-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hp-feedback-report-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.875rem;
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    background: var(--hp-surface);
}

.hp-feedback-report-card-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.hp-feedback-report-card-button:hover {
    border-color: var(--hp-primary);
    background: var(--hp-surface-raised);
}

.hp-feedback-drawer-toggle-unread::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--hp-success, #4caf50);
    flex-shrink: 0;
}

.hp-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.hp-ticket-message {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem;
    border-radius: var(--hp-radius-sm);
    border: 1px solid var(--hp-border-subtle);
}

.hp-ticket-message-customer {
    background: rgba(255, 255, 255, 0.03);
}

.hp-ticket-message-staff {
    background: rgba(110, 146, 192, 0.12);
    border-color: rgba(110, 146, 192, 0.35);
}

.hp-ticket-message-body {
    white-space: pre-wrap;
    word-break: break-word;
}

.hp-ticket-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--hp-border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.hp-ticket-attachment-chip:hover {
    border-color: var(--hp-primary-accent);
}

.hp-ticket-attachment-chip .rzi {
    font-size: 1rem;
}

.hp-workflow-title-link {
    color: inherit;
    text-decoration: none;
}

.hp-workflow-title-link:hover {
    color: var(--hp-primary-accent);
    text-decoration: underline;
}

.hp-workflow-status-message > span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.hp-workflow-status-message {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--hp-text-secondary);
    line-height: 1.4;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.hp-workflow-status-message.hp-status-error {
    background: rgba(220, 53, 69, 0.05);
    color: var(--hp-danger-light);
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.hp-workflow-card-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-workflow-card-actions:not(.hp-workflow-card-actions-stacked) .rz-button {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
}

.hp-workflow-card-actions-stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
}

.hp-workflow-card-actions-stacked .rz-button {
    width: 100%;
    justify-content: center;
}

.hp-resource-grid,
.hp-webapp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.hp-card.hp-resource-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 13.5rem;
}

.hp-card.hp-resource-card.hp-card-interactive:hover {
    transform: translateY(-2px);
}

.hp-card.hp-resource-card .hp-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    padding: 1.15rem 1.25rem 1rem;
    min-height: 0;
}

.hp-resource-card-header {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.2rem;
    align-items: start;
    margin-bottom: 0.85rem;
}

.hp-resource-card-icon {
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: rgba(110, 146, 192, 0.2);
    color: var(--hp-primary-accent);
    font-size: 1.35rem;
}

.hp-resource-card-icon--db {
    background: rgba(93, 191, 116, 0.14);
    color: var(--hp-success);
}

.hp-resource-card-icon--identity {
    background: rgba(196, 154, 108, 0.16);
    color: var(--hp-warning);
}

.hp-resource-card-icon--mail {
    background: rgba(126, 166, 224, 0.16);
    color: var(--hp-info, var(--hp-primary-accent));
}

.hp-resource-card-titleblock {
    grid-column: 2;
    min-width: 0;
}

.hp-resource-card-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--hp-text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hp-resource-card-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--hp-text-muted);
}

.hp-resource-card-status {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: end;
    flex-shrink: 0;
    padding-left: 0.35rem;
}

.hp-resource-card-status .hp-badge,
.hp-resource-card-status .rz-badge {
    white-space: nowrap;
}

.hp-resource-card-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.hp-resource-card-meta {
    margin: 0;
    padding: 0.85rem 0 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    min-height: 5.25rem;
    border-top: 1px solid var(--hp-border-subtle);
}

.hp-resource-card-meta-row {
    display: grid;
    grid-template-columns: 1.15rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--hp-text-secondary);
}

.hp-resource-card-meta-row .rzi {
    color: var(--hp-text-muted);
    font-size: 1rem;
    margin-top: 0.12rem;
}

.hp-resource-card-meta-value {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hp-resource-card-meta-value--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
}

.hp-resource-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--hp-border-subtle);
    font-size: 0.8125rem;
    color: var(--hp-text-muted);
}

.hp-resource-card-footer .rzi {
    color: var(--hp-primary-accent);
    font-size: 1.125rem;
    transition: transform 0.15s ease;
}

.hp-card.hp-resource-card:hover .hp-resource-card-footer .rzi {
    transform: translateX(3px);
}

.hp-webapp-list-card,
.hp-database-list-card {
    height: 100%;
}

.hp-workflow-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.hp-workflow-page-grid .hp-workflow-grid-card {
    width: 100%;
    height: 24rem;
    min-height: 24rem;
    max-height: 24rem;
}

.hp-workflow-page-grid .hp-workflow-grid-card .hp-workflow-stages-region {
    flex: 1;
    min-height: 8.75rem;
    overflow-y: auto;
    padding: 0.65rem 0.5rem 0.5rem;
    border-radius: var(--hp-radius-sm);
    background: rgba(255, 255, 255, 0.015);
}

.hp-workflow-detail-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hp-workflow-detail-header {
    margin-bottom: 0.25rem;
}

.hp-workflow-detail-panel .hp-card-body {
    padding: 1.5rem;
}

.hp-workflow-detail-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2.5rem;
}

@media (max-width: 900px) {
    .hp-workflow-detail-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.hp-workflow-detail-sections .hp-section + .hp-section {
    margin-top: 0;
}

.hp-workflow-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.hp-workflow-dl {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0;
}

.hp-workflow-dl-compact {
    gap: 0.45rem;
}

.hp-workflow-dl-row {
    display: grid;
    grid-template-columns: minmax(120px, 34%) 1fr;
    gap: 0.75rem;
    align-items: start;
}

.hp-workflow-dl-row dt {
    margin: 0;
    color: var(--hp-text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.hp-workflow-dl-row dd {
    margin: 0;
    color: var(--hp-text);
    font-size: 0.875rem;
    word-break: break-word;
}

.hp-workflow-resource-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hp-workflow-resource-link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.hp-workflow-stage-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.hp-workflow-stage-detail {
    border: 1px solid var(--hp-border-subtle);
    border-radius: var(--hp-radius-sm);
    padding: 1.125rem;
    background: var(--hp-surface);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    height: 100%;
}

.hp-workflow-stage-detail-active {
    border-color: rgba(110, 146, 192, 0.45);
    box-shadow: inset 3px 0 0 var(--hp-primary);
}

.hp-workflow-stage-detail-done {
    border-color: rgba(76, 175, 80, 0.35);
}

.hp-workflow-stage-detail-failed {
    border-color: rgba(244, 67, 54, 0.45);
    box-shadow: inset 3px 0 0 var(--hp-danger, #f44336);
}

.hp-workflow-stage-detail-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hp-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
}

.hp-access-ref,
.hp-access-endpoints {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.hp-access-ref-label,
.hp-access-endpoint-label {
    display: block;
    color: var(--hp-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hp-access-ref-value,
.hp-access-endpoint-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--hp-text);
    word-break: break-all;
}

.hp-access-endpoint-row {
    display: grid;
    grid-template-columns: minmax(110px, 28%) 1fr;
    gap: 0.75rem 1rem;
    align-items: start;
}

@media (max-width: 640px) {
    .hp-access-endpoint-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* Terminal / log viewers */

.hp-terminal {
    background: var(--hp-terminal-bg);
    color: var(--hp-terminal-text);
    border: 1px solid var(--hp-terminal-border);
    border-radius: var(--hp-radius-sm);
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    min-height: 320px;
    max-height: 480px;
}

.hp-terminal.hp-terminal-tall {
    min-height: unset;
    max-height: unset;
    height: 500px;
    font-size: 0.9rem;
}

.hp-terminal-text {
    color: var(--hp-terminal-text);
}

.hp-terminal-muted {
    color: var(--hp-terminal-muted);
    font-style: italic;
}

.hp-terminal-line {
    margin-bottom: 0.2rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--hp-terminal-text);
}

.hp-terminal-line.hp-terminal-line-spaced {
    margin-bottom: 0.25rem;
}

.hp-terminal-timestamp {
    color: var(--hp-terminal-muted);
}

.hp-terminal-level {
    font-weight: 600;
}

.hp-terminal-level-default {
    color: var(--hp-terminal-text);
}

.hp-terminal-error,
.hp-terminal-line.hp-terminal-error {
    color: var(--hp-terminal-error);
}

.hp-terminal-warn,
.hp-terminal-line.hp-terminal-warn {
    color: var(--hp-terminal-warn);
}

.hp-terminal-info,
.hp-terminal-level.hp-terminal-info {
    color: var(--hp-terminal-info);
}

.hp-terminal-debug,
.hp-terminal-line.hp-terminal-debug {
    color: var(--hp-terminal-muted);
}

.hp-terminal-streaming {
    color: var(--hp-terminal-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.hp-terminal-loading {
    padding: 2rem;
}

/* Cookie consent banner */

.hp-cookie-consent {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1200;
    padding: 1rem;
    pointer-events: none;
}

.hp-cookie-consent-inner {
    pointer-events: auto;
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    border-color: var(--hp-border);
    box-shadow: var(--hp-shadow);
}

.hp-cookie-consent-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hp-text);
}

.hp-cookie-consent-lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--hp-text-secondary);
    max-width: 42rem;
}

.hp-cookie-consent-link {
    color: var(--hp-primary-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hp-cookie-consent-settings {
    margin: 0.85rem 0 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 0.65rem;
}

.hp-cookie-consent-settings-legend {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hp-text);
    margin-bottom: 0.25rem;
}

.hp-cookie-consent-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--hp-text-secondary);
}

.hp-cookie-consent-option input {
    margin-top: 0.2rem;
    accent-color: var(--hp-primary);
}

.hp-cookie-consent-option-title {
    display: block;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-cookie-consent-option-hint {
    display: block;
    color: var(--hp-text-muted);
    line-height: 1.4;
}

.hp-cookie-consent-option-disabled {
    opacity: 0.72;
}

.hp-cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.hp-cookie-consent-btn {
    border-radius: var(--hp-radius-sm);
    padding: 0.55rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.hp-cookie-consent-btn-primary {
    background: var(--hp-gradient-primary);
    color: var(--hp-text);
    border-color: rgba(110, 146, 192, 0.45);
}

.hp-cookie-consent-btn-secondary {
    background: var(--hp-surface-overlay);
    color: var(--hp-text);
    border-color: var(--hp-border);
}

.hp-cookie-consent-btn-ghost {
    background: transparent;
    color: var(--hp-primary-accent);
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hp-account-preference-label {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.95rem;
    color: var(--hp-text-secondary);
    line-height: 1.45;
}

.hp-account-preference-label .rz-chkbox {
    margin-top: 0.15rem;
}

.auth-marketing-consent {
    margin-top: 0.35rem;
}

/* Cookie consent banner */

.hp-cookie-consent {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 10000;
    padding: 1rem;
    pointer-events: none;
}

.hp-cookie-consent-inner {
    pointer-events: auto;
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
    box-shadow: var(--hp-shadow);
}

.hp-cookie-consent-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hp-text);
}

.hp-cookie-consent-lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--hp-text-secondary);
    max-width: 42rem;
}

.hp-cookie-consent-link {
    color: var(--hp-primary-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hp-cookie-consent-link:hover {
    color: var(--hp-primary-light);
}

.hp-cookie-consent-settings {
    margin: 1rem 0 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 0.65rem;
    width: 100%;
}

.hp-cookie-consent-settings-legend {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hp-text);
    margin-bottom: 0.35rem;
}

.hp-cookie-consent-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--hp-text-secondary);
    cursor: pointer;
}

.hp-cookie-consent-option-locked,
.hp-cookie-consent-option-disabled {
    cursor: default;
    opacity: 0.92;
}

.hp-cookie-consent-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hp-cookie-consent-option-title {
    font-weight: 600;
    color: var(--hp-text);
}

.hp-cookie-consent-option-hint {
    color: var(--hp-text-muted);
    line-height: 1.4;
}

.hp-cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hp-cookie-consent-btn {
    border-radius: var(--hp-radius-sm);
    padding: 0.55rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.hp-cookie-consent-btn-primary {
    background: var(--hp-gradient-primary);
    color: var(--hp-text);
    border-color: rgba(110, 146, 192, 0.45);
}

.hp-cookie-consent-btn-secondary {
    background: var(--hp-surface-overlay);
    color: var(--hp-text);
    border-color: var(--hp-border);
}

.hp-cookie-consent-btn-ghost {
    background: transparent;
    color: var(--hp-text-secondary);
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hp-cookie-consent-btn:hover {
    filter: brightness(1.05);
}

.hp-cookie-consent-btn:focus-visible {
    outline: 2px solid var(--hp-primary-accent);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .hp-cookie-consent-inner {
        padding: 1rem;
    }

    .hp-cookie-consent-actions {
        width: 100%;
    }

    .hp-cookie-consent-btn {
        flex: 1 1 auto;
        min-width: 8rem;
    }
}

/* ===== Resource list shell ===== */
.hp-list-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ===== Inline forms (HpInlineForm) ===== */
.hp-inline-form-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 0.75rem;
    align-items: end;
}

.hp-inline-form-fields .hp-inline-form-full {
    grid-column: 1 / -1;
}

/* ===== Pending changes (restart required) banner ===== */
.hp-pending-changes-banner {
    width: 100%;
}

.hp-pending-changes-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hp-pending-changes-list code {
    font-size: 0.8125rem;
    margin-right: 0.5rem;
}

/* ===== Traffic analytics — requested routes (ResourceTrafficAnalyzer) ===== */
.hp-route-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.hp-route-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hp-route-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    background: var(--hp-surface-raised);
    color: var(--hp-text);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.hp-route-chip:hover {
    border-color: var(--hp-primary);
}

.hp-route-chip:focus-visible {
    outline: none;
    box-shadow: var(--hp-focus-ring);
}

.hp-route-chip-active {
    border-color: var(--hp-primary);
    background: var(--hp-primary-muted);
    color: var(--hp-primary-accent);
}

.hp-route-chip-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.hp-route-chip-count {
    color: var(--hp-text-muted);
    font-weight: 500;
}

.hp-route-chip-active .hp-route-chip-count {
    color: inherit;
}

.hp-route-path {
    font-size: 0.8125rem;
    word-break: break-all;
}

.hp-route-path-special {
    font-style: italic;
    color: var(--hp-text-muted);
}

.hp-route-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hp-route-share-bar {
    flex: 1;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--hp-bg-base);
    overflow: hidden;
}

.hp-route-share-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--hp-gradient-primary);
    min-width: 2px;
}

.hp-route-share-text {
    font-size: 0.75rem;
    color: var(--hp-text-muted);
    min-width: 2.75rem;
    text-align: right;
}

.hp-route-zero {
    color: var(--hp-text-muted);
    opacity: 0.45;
}

.hp-route-reason {
    margin-left: 0.5rem;
    font-size: 0.8125rem;
}

/* Prose column for legal/document pages. Replaces the inline max-width the four legal pages
   each carried, so the measure is set in one place and works under both the app shell and the
   anonymous shell. */
.hp-page-prose {
    max-width: 48rem;
    margin-inline: auto;
}
