:root {
    --hf-bg: #F2F2F2;
    --hf-bg-secondary: #F8FAFC;
    --hf-border: #E2E8F0;
    --hf-gold: #D98A1F;
    --hf-gold-bright: #F5A623;
    --hf-gold-glow: #FFC165;
    --hf-cyan: #F5A623;
    --hf-blue-deep: #B56F15;
    --hf-green: #16A34A;
    --hf-purple: #7C3AED;
    --hf-text: #0F172A;
    --hf-text-secondary: #64748B;
    --hf-text-muted: #94A3B8;
}

html, body {
    font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    background: var(--hf-bg);
    color: var(--hf-text);
    color-scheme: light;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hf-text);
    font-weight: 700;
}

a {
    color: var(--hf-cyan);
}

a:hover {
    color: var(--hf-gold-bright);
}

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=time],
input[type=search], input[type=tel], input[type=url],
select, textarea {
    background: var(--hf-bg);
    border: 1px solid var(--hf-border);
    color: var(--hf-text);
    border-radius: 6px;
    padding: .55rem .7rem;
    font-size: .9rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=number]:focus, input[type=date]:focus, input[type=time]:focus,
select:focus, textarea:focus {
    outline: 2px solid var(--hf-cyan);
    outline-offset: 1px;
}

input[type=checkbox] {
    accent-color: var(--hf-gold-bright);
    width: auto;
}

::placeholder {
    color: var(--hf-text-muted);
}

label {
    color: var(--hf-text-secondary);
}

button {
    font-family: inherit;
}

.alert-danger {
    background: rgba(239, 68, 68, .08);
    border: 1px solid #ef4444;
    color: #b91c1c;
    padding: .75rem 1rem;
    border-radius: 8px;
}

.alert-success {
    background: rgba(85, 217, 79, .1);
    border: 1px solid var(--hf-green);
    color: var(--hf-green);
    padding: .75rem 1rem;
    border-radius: 8px;
}

/* =========================================
   HFEIP Page Structure
   ========================================= */

.hfeip-page {
    width: 100%;
}

.hfeip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hfeip-eyebrow {
    color: var(--hf-gold);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    font-weight: 600;
    margin: 0 0 .35rem;
}

.hfeip-subtitle {
    color: var(--hf-text-secondary);
    margin: 0;
}

/* =========================================
   HFEIP Cards / Panels
   ========================================= */

.hfeip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hfeip-card {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.hfeip-card span {
    color: var(--hf-text-secondary);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hfeip-card strong {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--hf-gold-bright);
}

.hfeip-card small {
    color: var(--hf-text-muted);
}

.hfeip-panel {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.hfeip-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.hfeip-panel-header h2 {
    margin: 0 0 .25rem;
    font-size: 1.15rem;
}

.hfeip-panel-header p {
    margin: 0;
    color: var(--hf-text-secondary);
    font-size: .9rem;
}

.hfeip-admin-card {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--hf-text);
    display: block;
    transition: border-color .15s ease, transform .15s ease;
}

.hfeip-admin-card:hover {
    border-color: var(--hf-cyan);
    transform: translateY(-2px);
    color: var(--hf-text);
}

.hfeip-admin-card-disabled {
    opacity: .5;
    pointer-events: none;
}

.hfeip-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--hf-text-secondary);
    border: 1px dashed var(--hf-border);
    border-radius: 10px;
}

.hfeip-mode-toggle {
    display: inline-flex;
    border: 1px solid var(--hf-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.hfeip-mode-toggle button {
    background: transparent;
    border: none;
    color: var(--hf-text-secondary);
    padding: .55rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
}

.hfeip-mode-toggle button + button {
    border-left: 1px solid var(--hf-border);
}

.hfeip-mode-toggle button.active {
    background: var(--hf-bg-secondary);
    color: var(--hf-gold-bright);
}

.hfeip-mode-toggle button:hover:not(.active) {
    background: rgba(15, 23, 42, .04);
    color: var(--hf-text);
}

/* =========================================
   HFEIP Forms
   ========================================= */

.hfeip-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.hfeip-form-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.hfeip-form-field-full {
    grid-column: 1 / -1;
}

.hfeip-form-field label {
    font-size: .8rem;
    font-weight: 600;
}

.hfeip-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
}

/* =========================================
   HFEIP Buttons
   ========================================= */

.hfeip-primary-button {
    background: linear-gradient(135deg, var(--hf-gold-bright), var(--hf-gold-glow));
    color: #1a1200;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: filter .15s ease;
}

.hfeip-primary-button:hover {
    filter: brightness(1.08);
    color: #1a1200;
}

.hfeip-primary-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.hfeip-secondary-button {
    background: transparent;
    border: 1px solid var(--hf-border);
    color: var(--hf-text);
    border-radius: 8px;
    padding: .6rem 1.25rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hfeip-secondary-button:hover {
    background: rgba(15, 23, 42, .04);
    border-color: var(--hf-cyan);
    color: var(--hf-text);
}

.hfeip-secondary-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.hfeip-secondary-button:disabled:hover {
    background: transparent;
    border-color: var(--hf-border);
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================
   HFEIP Responsive Tables
   ========================================= */


.hfeip-table-container {
    width: 100%;
    overflow-x: auto;
}



.hfeip-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
}



.hfeip-table th,
.hfeip-table td {
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
}



.hfeip-table th {
    font-weight: 600;
    color: var(--hf-text-secondary);
    border-bottom: 2px solid var(--hf-border);
}



.hfeip-table tr {
    border-bottom: 1px solid var(--hf-border);
}



.hfeip-table tbody tr:hover {
    background: rgba(15, 23, 42, .025);
}



.hfeip-wrap-cell {
    white-space: normal !important;
    max-width: 320px;
}



.hfeip-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}



@media(max-width:900px)
{

    .hfeip-table-container {
        overflow-x: auto;
    }


    .hfeip-table {
        min-width: 1000px;
    }

}

/* =========================================
   HFEIP Dashboard
   ========================================= */

.hf-dash-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hf-kpi {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.hf-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.hf-kpi-label {
    color: var(--hf-text-secondary);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hf-kpi-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 166, 35, .12);
    color: var(--hf-gold);
    flex: none;
}

.hf-kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--hf-text);
    line-height: 1.1;
}

.hf-kpi-sub {
    color: var(--hf-text-muted);
    font-size: .78rem;
}

/* Dashboard panel grid */
.hf-dash-row {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.hf-dash-row.cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.hf-dash-row.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.hf-card {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
}

.hf-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

.hf-card-title h2 {
    font-size: 1.02rem;
    margin: 0;
}

.hf-card-title a {
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Donut + legend */
.hf-donut-wrap {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.hf-donut {
    position: relative;
    width: 168px;
    height: 168px;
    flex: none;
}

.hf-donut svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.hf-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hf-donut-center strong {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--hf-text);
    line-height: 1;
}

.hf-donut-center span {
    font-size: .72rem;
    color: var(--hf-text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hf-legend {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1 1 160px;
    min-width: 160px;
}

.hf-legend-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .86rem;
}

.hf-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex: none;
}

.hf-legend-name {
    color: var(--hf-text-secondary);
    flex: 1;
}

.hf-legend-val {
    font-weight: 600;
    color: var(--hf-text);
}

.hf-legend-pct {
    color: var(--hf-text-muted);
    width: 3.2rem;
    text-align: right;
}

/* Horizontal bars (priority) */
.hf-bars {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.hf-bar-row {
    display: grid;
    grid-template-columns: 5rem 1fr 3.5rem;
    align-items: center;
    gap: .75rem;
}

.hf-bar-label {
    font-size: .85rem;
    color: var(--hf-text-secondary);
}

.hf-bar-track {
    background: rgba(148, 163, 184, .18);
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
}

.hf-bar-fill {
    height: 100%;
    border-radius: 6px;
    min-width: 2px;
}

.hf-bar-val {
    font-size: .82rem;
    font-weight: 600;
    color: var(--hf-text);
    text-align: right;
}

/* Trend chart */
.hf-trend {
    width: 100%;
}

.hf-trend svg {
    width: 100%;
    height: auto;
    display: block;
}

.hf-trend-legend {
    display: flex;
    gap: 1.25rem;
    margin-bottom: .75rem;
}

.hf-trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: var(--hf-text-secondary);
}

/* Top lists */
.hf-toplist {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.hf-toplist-item {
    display: grid;
    grid-template-columns: 1.2rem 1fr auto;
    align-items: center;
    gap: .75rem;
}

.hf-rank {
    color: var(--hf-text-muted);
    font-size: .82rem;
    font-weight: 600;
}

.hf-toplist-main {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
}

.hf-toplist-name {
    font-size: .88rem;
    color: var(--hf-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hf-mini-bar {
    height: 6px;
    border-radius: 4px;
    background: rgba(148, 163, 184, .18);
    overflow: hidden;
}

.hf-mini-bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
}

.hf-toplist-val {
    font-weight: 700;
    color: var(--hf-text);
    font-size: .9rem;
}

/* Activity feed */
.hf-activity {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hf-activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .7rem;
    align-items: start;
}

.hf-activity-dot {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: .8rem;
}

.hf-activity-body {
    font-size: .86rem;
    min-width: 0;
}

.hf-activity-body .t {
    color: var(--hf-text);
}

.hf-activity-body .m {
    color: var(--hf-text-secondary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hf-pill {
    display: inline-block;
    padding: .12rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
}

/* =========================================
   HFEIP Tickets page
   ========================================= */

.hf-tk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .85rem;
    margin-bottom: 1.5rem;
}

.hf-tk-card {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: .9rem 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    transition: border-color .15s ease;
    text-align: left;
    font-family: inherit;
}

.hf-tk-card:hover { border-color: var(--hf-cyan); }

.hf-tk-card.active {
    border-color: var(--hf-gold-bright);
    box-shadow: 0 0 0 1px var(--hf-gold-bright) inset;
}

.hf-tk-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hf-tk-card-num { font-size: 1.5rem; font-weight: 700; color: var(--hf-text); }
.hf-tk-card-label { font-size: .75rem; color: var(--hf-text-secondary); }

.hf-tk-card-ic {
    width: 26px; height: 26px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    flex: none;
}

.hf-tk-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.hf-tk-main { flex: 1; min-width: 0; }
.hf-tk-side { width: 270px; flex: none; }

@media(max-width: 1080px) {
    .hf-tk-layout { flex-direction: column; }
    .hf-tk-side { width: 100%; }
}

.hf-tk-toolbar {
    display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
    margin-bottom: 1rem;
}
.hf-tk-toolbar .hf-tk-search { flex: 1; min-width: 180px; }
.hf-tk-toolbar select { width: auto; min-width: 130px; }

.hf-pill-pri, .hf-pill-status {
    display: inline-block; padding: .15rem .6rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; white-space: nowrap;
}

.hf-sla { font-weight: 600; font-size: .82rem; white-space: nowrap; }

.hf-assignee { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.hf-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 700; color: #fff; flex: none;
}

.hf-tk-side-panel {
    background: var(--hf-bg-secondary);
    border: 1px solid var(--hf-border);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.25rem;
}
.hf-tk-side-panel h3 {
    font-size: 1rem; margin: 0 0 1rem;
    display: flex; justify-content: space-between; align-items: center;
}
.hf-tk-fgroup { margin-bottom: .9rem; }
.hf-tk-fgroup label { font-size: .75rem; font-weight: 600; display: block; margin-bottom: .3rem; color: var(--hf-text-secondary); }

.hf-saved-view {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem 0; cursor: pointer; color: var(--hf-text-secondary);
    font-size: .86rem; border: none; background: none; width: 100%;
    text-align: left; font-family: inherit;
}
.hf-saved-view:hover { color: var(--hf-gold-bright); }

.hf-pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-top: 1rem; flex-wrap: wrap;
    color: var(--hf-text-secondary); font-size: .84rem;
}
.hf-pager-btns { display: flex; gap: .3rem; align-items: center; }
.hf-pager-btns button {
    background: transparent; border: 1px solid var(--hf-border);
    border-radius: 6px; padding: .35rem .65rem; cursor: pointer;
    color: var(--hf-text); font-size: .82rem; font-family: inherit; min-width: 2rem;
}
.hf-pager-btns button.active {
    background: var(--hf-gold-bright); border-color: var(--hf-gold-bright);
    color: #1a1200; font-weight: 700;
}
.hf-pager-btns button:disabled { opacity: .4; cursor: not-allowed; }

.hf-menu { position: relative; display: inline-block; }
.hf-menu-btn {
    background: transparent; border: none; cursor: pointer;
    padding: .1rem .5rem; color: var(--hf-text-secondary);
    font-size: 1.2rem; line-height: 1; font-family: inherit;
}
.hf-menu-list {
    position: absolute; right: 0; top: 100%;
    background: var(--hf-bg-secondary); border: 1px solid var(--hf-border);
    border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
    z-index: 30; min-width: 160px; padding: .3rem;
}
.hf-menu-list a, .hf-menu-list button {
    display: block; width: 100%; text-align: left;
    padding: .45rem .6rem; border: none; background: none;
    color: var(--hf-text); font-size: .85rem; cursor: pointer;
    border-radius: 6px; text-decoration: none; font-family: inherit;
}
.hf-menu-list a:hover, .hf-menu-list button:hover { background: rgba(15,23,42,.05); }
.hf-menu-list button:disabled { opacity: .45; cursor: not-allowed; }

/* =========================================
   HFEIP Rich text editor + New Ticket
   ========================================= */

.hf-rte-wrap {
    border: 1px solid var(--hf-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--hf-bg);
}
.hf-rte-toolbar {
    display: flex; gap: .15rem; align-items: center; flex-wrap: wrap;
    padding: .4rem .5rem;
    border-bottom: 1px solid var(--hf-border);
    background: var(--hf-bg-secondary);
}
.hf-rte-toolbar button {
    background: transparent; border: none; min-width: 30px; height: 30px;
    border-radius: 5px; cursor: pointer; color: var(--hf-text-secondary);
    font-size: .9rem; display: inline-flex; align-items: center; justify-content: center;
    font-family: inherit; padding: 0 .4rem;
}
.hf-rte-toolbar button:hover { background: rgba(15,23,42,.06); color: var(--hf-text); }
.hf-rte-toolbar select { width: auto; min-width: 110px; padding: .3rem .5rem; font-size: .82rem; }
.hf-rte-divider { width: 1px; height: 20px; background: var(--hf-border); margin: 0 .3rem; }

.hf-rte {
    min-height: 190px; padding: .75rem .85rem; outline: none;
    font-size: .9rem; line-height: 1.55; color: var(--hf-text);
}
.hf-rte:empty:before { content: attr(data-placeholder); color: var(--hf-text-muted); }
.hf-rte p { margin: 0 0 .55rem; }
.hf-rte ul, .hf-rte ol { margin: 0 0 .55rem 1.4rem; }
.hf-rte blockquote { margin: 0 0 .55rem; padding-left: .8rem; border-left: 3px solid var(--hf-border); color: var(--hf-text-secondary); }

.hf-attach-zone {
    border: 2px dashed var(--hf-border); border-radius: 10px;
    padding: 2rem 1rem; text-align: center; color: var(--hf-text-muted);
    background: var(--hf-bg); font-size: .85rem;
}
.hf-req-note { font-size: .78rem; color: var(--hf-text-muted); margin: .3rem 0 0; }

.hf-rte-content { font-size: .9rem; line-height: 1.55; color: var(--hf-text); }
.hf-rte-content p { margin: 0 0 .55rem; }
.hf-rte-content ul, .hf-rte-content ol { margin: 0 0 .55rem 1.4rem; }
.hf-rte-content blockquote { margin: 0 0 .55rem; padding-left: .8rem; border-left: 3px solid var(--hf-border); color: var(--hf-text-secondary); }

/* =========================================
   HFEIP Ticket detail redesign
   ========================================= */

.hf-td-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem 1.5rem;
}
.hf-td-field label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--hf-text-secondary); font-weight: 600; display: block; margin-bottom: .35rem;
}
.hf-td-field .val { color: var(--hf-text); font-size: .92rem; }
.hf-td-field.full { grid-column: 1 / -1; }

.hf-note-tabs { display: inline-flex; gap: .4rem; margin-bottom: .75rem; }
.hf-note-tab {
    border: 1px solid var(--hf-border); background: transparent; border-radius: 8px;
    padding: .4rem .8rem; cursor: pointer; font-size: .82rem; font-weight: 600;
    color: var(--hf-text-secondary); font-family: inherit;
    display: inline-flex; gap: .4rem; align-items: center;
}
.hf-note-tab.active.internal { background: rgba(37,99,235,.1); border-color: #2563EB; color: #1D4ED8; }
.hf-note-tab.active.client { background: rgba(22,163,74,.12); border-color: #16A34A; color: #15803D; }

.hf-timeline { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
.hf-tl-item { display: grid; grid-template-columns: auto 1fr; gap: .75rem; }
.hf-tl-avatar {
    width: 34px; height: 34px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; font-size: .72rem; font-weight: 700;
    color: #fff; flex: none;
}
.hf-tl-sys-icon {
    width: 34px; height: 34px; border-radius: 50%; background: var(--hf-bg);
    border: 1px solid var(--hf-border); display: inline-flex; align-items: center;
    justify-content: center; flex: none; color: var(--hf-text-secondary);
}
.hf-tl-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .35rem; }
.hf-tl-author { font-weight: 700; font-size: .88rem; }
.hf-tl-time { color: var(--hf-text-muted); font-size: .78rem; margin-left: auto; }
.hf-tl-badge { font-size: .7rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; }
.hf-tl-body {
    background: var(--hf-bg); border: 1px solid var(--hf-border); border-radius: 8px;
    padding: .7rem .85rem; font-size: .88rem; white-space: pre-wrap; word-break: break-word;
}
.hf-tl-sys { color: var(--hf-text-secondary); font-size: .86rem; }
.hf-tl-actions { display: flex; gap: .6rem; margin-top: .35rem; }
.hf-tl-actions button {
    background: none; border: none; color: var(--hf-text-muted); cursor: pointer;
    font-size: .76rem; font-family: inherit; padding: 0;
}
.hf-tl-actions button:hover { color: var(--hf-gold-bright); }

.hf-td-res dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--hf-text-secondary); font-weight: 600; margin-top: .85rem; }
.hf-td-res dd { margin: .25rem 0 0; font-size: .9rem; color: var(--hf-text); }
.hf-td-res dd .who { display: inline-flex; align-items: center; gap: .5rem; }

/* =========================================
   HFEIP Manage Clients
   ========================================= */

.hf-cl-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.hf-cl-main { flex: 1; min-width: 0; }
.hf-cl-drawer { width: 360px; flex: none; }
@media(max-width: 1200px) { .hf-cl-layout { flex-direction: column; } .hf-cl-drawer { width: 100%; } }

.hf-cl-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hf-cl-drawer-head h3 { margin: 0; font-size: 1.05rem; }

.hf-cl-tabs { display: flex; gap: .1rem; border-bottom: 1px solid var(--hf-border); margin-bottom: 1.1rem; flex-wrap: wrap; }
.hf-cl-tab {
    background: none; border: none; padding: .5rem .7rem; cursor: pointer;
    font-size: .84rem; font-weight: 600; color: var(--hf-text-secondary);
    border-bottom: 2px solid transparent; font-family: inherit;
}
.hf-cl-tab.active { color: var(--hf-gold-bright); border-bottom-color: var(--hf-gold-bright); }

.hf-cl-section-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--hf-text-secondary); font-weight: 700; margin: 1.25rem 0 .6rem;
}
.hf-cl-section-title:first-child { margin-top: 0; }

.hf-cl-row-name { display: flex; align-items: center; gap: .6rem; }
.hf-cl-row-name .sub { color: var(--hf-text-muted); font-size: .78rem; }

.hf-cl-site {
    display: flex; align-items: flex-start; gap: .6rem; padding: .6rem 0;
    border-bottom: 1px solid var(--hf-border);
}
.hf-cl-site .body { flex: 1; }
.hf-cl-site .name { font-weight: 600; font-size: .88rem; }
.hf-cl-site .addr { color: var(--hf-text-secondary); font-size: .82rem; }

/* Modal */
.hf-modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.45);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4rem 1rem; z-index: 1000; overflow-y: auto;
}
.hf-modal {
    background: var(--hf-bg-secondary); border: 1px solid var(--hf-border);
    border-radius: 14px; padding: 1.5rem; width: 100%; max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.hf-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hf-modal-head h2 { margin: 0; font-size: 1.15rem; }
.hf-bulk-summary { font-size: .85rem; }
.hf-bulk-summary .ok { color: #15803D; }
.hf-bulk-summary .skip { color: var(--hf-text-secondary); }