      :root {
        --topbar-height: 62px;
        --module-strip-height: 38px;
        --bg: #f4f7fa;
        --surface: #ffffff;
        --surface-soft: #f8fafc;
        --line: #d7e1eb;
        --ink: #1f2b38;
        --muted: #64768a;
        --nav: #1e2631;
        --nav-2: #18202a;
        --brand: #2f79c7;
        --ok: #2f9b67;
        --pending: #2f79c7;
        --expired: #c44747;
        --ok-bg: #e8f7ef;
        --pending-bg: #e8f0fd;
        --expired-bg: #fbe9e8;
      }

      * { box-sizing: border-box; }
      h1, h2, h3, h4 { margin: 0; }
      html, body {
        margin: 0;
        padding: 0;
        min-height: 100%;
        font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
        color: var(--ink);
        background: linear-gradient(180deg, #f8fbff, var(--bg));
        overflow-x: hidden;
      }

      .topbar {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 90;
        height: var(--topbar-height);
        background: linear-gradient(180deg, var(--nav), var(--nav-2));
        border-bottom: 1px solid #111820;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
        transition: transform 0.22s ease, opacity 0.22s ease;
      }

      .top-left { display: flex; align-items: center; gap: 10px; }
      .top-right { margin-left: auto; display: flex; align-items: center; }

      .module-strip {
        position: sticky;
        top: var(--topbar-height);
        z-index: 24;
        width: 100%;
        background: #f2f6fb;
        border-bottom: 1px solid #d6e0ea;
        padding: 8px 12px;
        min-height: var(--module-strip-height);
        transition: transform 0.2s ease, opacity 0.2s ease;
      }

      .module-strip-title {
        font-size: 12px;
        line-height: 1.2;
        font-weight: 800;
        letter-spacing: 0.02em;
        color: #304256;
      }

      body.module-strip-hidden .module-strip {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
      }

      .menu-btn {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.09);
        color: #edf3fb;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
      }

      .brand { display: flex; align-items: center; gap: 10px; }
      .brand-link {
        border: 0;
        padding: 0;
        background: transparent;
        cursor: pointer;
        text-align: left;
        text-decoration: none;
        color: inherit;
        font: inherit;
      }

      .brand-link:focus-visible {
        outline: 2px solid #7da1c6;
        outline-offset: 4px;
        border-radius: 12px;
      }
      .logo {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        display: grid;
        place-items: center;
        font-weight: 900;
        font-size: 12px;
        color: #2a3f54;
        border: 1px solid #bdccd9;
        background: linear-gradient(135deg, #f4f7fb, #dce7f2);
      }

      .brand h1 {
        margin: 0;
        font-size: 18px;
        color: #edf3fa;
      }

      .brand h1 span { color: #9db8d4; }

      .env-pill {
        font-size: 11px;
        color: #d8e6f4;
        border: 1px solid rgba(157, 183, 210, 0.5);
        border-radius: 999px;
        padding: 6px 9px;
      }

      .layout {
        display: flex;
        min-height: calc(100vh - (var(--topbar-height) + var(--module-strip-height)));
        position: relative;
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
      }

      .layout.sidebar-open::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 32, 0.45);
        z-index: 15;
      }

      .sidebar {
        width: 280px;
        max-width: 86vw;
        background: linear-gradient(180deg, #2a3441, #212b37);
        border-right: 1px solid #17212b;
        color: #d2deeb;
        padding: 14px;
        position: relative;
        z-index: 80;
        transition: transform 0.24s ease;
        box-shadow: 10px 0 24px rgba(0, 0, 0, 0.17);
      }

      .sidebar.hidden {
        transform: translateX(-100%);
        position: absolute;
        z-index: 80;
        height: calc(100vh - 62px);
      }

      .menu-title {
        margin: 3px 0 9px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        font-size: 11px;
        color: #edf5fd;
      }

      .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .admin-pill {
        margin: 8px 0 12px;
        padding: 10px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.06);
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
      }

      .admin-pill:hover {
        background: rgba(255, 255, 255, 0.09);
        border-color: rgba(255, 255, 255, 0.12);
      }

      .admin-avatar {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.08);
        object-fit: cover;
        flex: 0 0 auto;
      }

      .admin-meta {
        min-width: 0;
        display: grid;
        gap: 2px;
      }

      .admin-name {
        font-size: 13px;
        font-weight: 800;
        color: #f2f7fd;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .admin-email {
        font-size: 12px;
        color: rgba(210, 222, 235, 0.9);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .menu-item {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
        border: 0;
        border-radius: 10px;
        margin-bottom: 8px;
        padding: 12px;
        font-size: 14px;
        font-weight: 600;
        color: #c5d3e1;
        background: transparent;
        cursor: pointer;
      }

      .menu-item.active {
        background: #3d556b;
        color: #f7fcff;
      }
      .menu-item:hover {
        background: #344b60;
        color: #f7fcff;
      }
      .sidebar a.menu-item {
        text-decoration: none;
      }
      .menu-item::before {
        content: "•";
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        line-height: 1;
        color: #afc1d3;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
      }
      .menu-item:hover::before,
      .menu-item.active::before {
        color: #f6fbff;
        border-color: rgba(255, 255, 255, 0.28);
        background: rgba(255, 255, 255, 0.14);
      }
      .menu-item-dashboard::before { content: "\2302"; }
      .menu-item-forecast::before { content: "\2197"; }
      .menu-item-analytics::before { content: "\25A6"; }
      .menu-item-batches::before { content: "\25A4"; }
      .menu-item-churn::before { content: "\2665"; }
      .menu-item-queue::before { content: "\231B"; }
      .menu-item-payments::before { content: "\0024"; }
      .menu-item-errors::before { content: "\26A0"; }
      .menu-item-chat::before { content: "\2709"; }
      .menu-item-admin::before { content: "\2699"; }
      .menu-item-system::before { content: "\2328"; }
      .menu-item-return::before { content: "\21A9"; }
      .menu-item-logout::before { content: "\21AA"; }
      .menu-item-label {
        min-width: 0;
      }

      .content {
        flex: 1;
        min-width: 0;
        width: 100%;
        padding: 12px;
        display: grid;
        gap: 8px;
      }

      .view-section {
        display: grid;
        gap: 8px;
        min-width: 0;
        width: 100%;
      }

      .card {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        min-width: 0;
      }

      .head h2 {
        margin: 0;
        font-size: 24px;
      }

      .head p {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 14px;
      }

      .meta { color: var(--muted); font-size: 13px; }
      .selector-picker {
        position: relative;
      }

      .selector-picker-btn {
        width: 100%;
        border: 1px solid #ccd7e1;
        border-radius: 10px;
        background: #fff;
        padding: 8px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        color: #1f2c39;
        cursor: pointer;
      }

      .picker-caret {
        font-size: 16px;
        line-height: 1;
      }

      .selector-icon-only .selector-picker-btn {
        width: 56px;
        padding: 8px 7px;
        justify-content: center;
      }

      .selector-icon-only .picker-left {
        gap: 0;
      }

      .picker-left {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }

      .picker-logo {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        border: 1px solid #c7d6e4;
        object-fit: cover;
        background: #f2f6fb;
      }

      .picker-label {
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .selector-picker-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        z-index: 95;
        border: 1px solid #d3dde7;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 12px 24px rgba(12, 22, 32, 0.12);
        padding: 6px;
        display: grid;
        gap: 4px;
      }

      .picker-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 4px 6px 6px;
      }

      .icon-btn {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        border: 1px solid #cbd6e2;
        background: #fff;
        color: #2a3949;
        font-size: 14px;
        line-height: 1;
        cursor: pointer;
      }
      .selector-icon-only .selector-picker-menu {
        left: auto;
        right: 0;
        width: max-content;
        min-width: 220px;
      }

      .selector-option {
        border: 0;
        border-radius: 8px;
        background: transparent;
        text-align: left;
        padding: 7px 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        white-space: nowrap;
        cursor: pointer;
      }

      .selector-option:hover { background: #f2f6fb; }
      .selector-option.active {
        background: #e6f0fb;
        box-shadow: inset 0 0 0 1px #cbddef;
      }

      .metrics { padding: 10px; }
      .metrics-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
      }

      .metric {
        border: 1px solid #e1e8f0;
        border-radius: 12px;
        background: var(--surface-soft);
        padding: 10px;
      }

      .metric-btn {
        display: block;
        width: 100%;
        text-align: left;
        cursor: pointer;
        font: inherit;
      }

      .metric-btn:hover {
        border-color: #cbddef;
        box-shadow: 0 1px 0 rgba(18, 32, 47, 0.04);
      }

      .metric-btn:focus-visible {
        outline: 2px solid #7da1c6;
        outline-offset: 2px;
      }

      .metric .label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted);
      }

      .metric .value {
        margin-top: 5px;
        font-size: 20px;
        font-weight: 800;
        color: #203142;
      }

      .search { padding: 9px 10px; }
      .search-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }
      .search-input-row {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .search-input-row input {
        flex: 1;
        min-width: 0;
      }
      .search-close-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 18px;
      }
      #view-subscribers .search {
        position: sticky;
        top: calc(var(--topbar-height) + var(--module-strip-height) + 8px);
        z-index: 26;
        overflow: hidden;
      }
      #view-subscribers .search::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 3px;
        opacity: 0;
        background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(65, 133, 197, 0.95) 45%, rgba(0,0,0,0) 100%);
        transform: translateX(-70%);
        pointer-events: none;
      }
      body.is-loading #view-subscribers .search::after {
        opacity: 1;
        animation: search-sweep 0.75s ease-in-out infinite;
      }
      @keyframes search-sweep {
        0% { transform: translateX(-70%); }
        50% { transform: translateX(70%); }
        100% { transform: translateX(-70%); }
      }
      #view-subscribers .search.is-fixed {
        position: fixed;
        z-index: 50;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
      }

      body.search-fixed-active #view-subscribers {
        padding-top: var(--search-fixed-height, 0px);
      }

      body.search-collapsed .filter-row,
      body.search-collapsed .search-helper,
      body.search-collapsed .search .actions {
        display: none;
      }
      .row {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .field {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 6px;
      }

      .field label {
        font-size: 12px;
        font-weight: 700;
        color: #46596d;
      }

      .field input,
      .field select {
        border: 1px solid #ccd7e1;
        border-radius: 10px;
        padding: 11px;
        font-size: 16px;
        outline: none;
        background: #fff;
        color: #1f2c39;
      }

      .field input:focus,
      .field select:focus {
        border-color: #89abc9;
        box-shadow: 0 0 0 3px rgba(86, 134, 182, 0.14);
      }

      .search-helper {
        margin-top: 10px;
        border: 1px solid #dae4ee;
        border-radius: 10px;
        background: #f8fbfd;
        padding: 8px 10px;
      }

      .filter-row {
        margin-top: 10px;
        display: grid;
        gap: 6px;
      }

      .filter-label {
        font-size: 12px;
        font-weight: 700;
        color: #46596d;
      }

      .filter-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
      }

      .filter-btn {
        border-radius: 999px;
        border: 1px solid #c7d6e4;
        background: #fff;
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 700;
        color: #2a3949;
        cursor: pointer;
      }

      .filter-btn.active {
        background: #e6f0fb;
        border-color: #8eb0d4;
        color: #1f3a55;
      }

      .search-tags {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .tag {
        font-size: 12px;
        border: 1px solid #cad8e7;
        background: #edf3f8;
        color: #34516b;
        border-radius: 999px;
        padding: 5px 9px;
      }

      .tag mark {
        background: #ffe99c;
        color: #1f2b38;
        border-radius: 3px;
        padding: 0 2px;
      }

	      .actions {
	        margin-top: 8px;
	        display: flex;
	        flex-wrap: wrap;
	        gap: 8px;
	      }

	      .payments-mode-switch {
	        display: inline-flex;
	        align-items: center;
	        gap: 6px;
	        flex-wrap: wrap;
	      }

	      .payments-toolbar .meta {
	        display: inline-flex;
	        align-items: center;
	        gap: 6px;
	      }

	      .payments-toolbar select,
	      .payments-toolbar input[type="text"] {
	        border-radius: 8px;
	        border: 1px solid #c5d1dc;
	        padding: 7px 9px;
	        font-size: 12px;
	        color: #233648;
	        background: #fff;
	      }

      .btn {
        border-radius: 10px;
        border: 1px solid transparent;
        padding: 10px 13px;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }

      .btn-primary {
        color: #fff;
        border-color: #1c2937;
        background: linear-gradient(180deg, #324255, #273545);
      }

      .btn-secondary {
        border-color: #c5d1dc;
        background: #fff;
        color: #2a3949;
      }

      .subscribers-section.hidden { display: none; }

      .section-head {
        padding: 8px 10px;
        border-bottom: 1px solid var(--line);
        background: var(--surface-soft);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
      }

      .section-head h3 { font-size: 16px; }

      .summary-list {
        display: grid;
        gap: 9px;
        padding: 10px;
      }

      .summary-item {
        border: 1px solid #e0e8f0;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
      }

      .summary-item > summary {
        list-style: none;
      }

      .summary-item > summary::-webkit-details-marker {
        display: none;
      }

      .summary-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px;
        cursor: pointer;
      }

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

      .summary-title {
        font-weight: 700;
        font-size: 14px;
      }

      .summary-title-with-logo {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }

      .summary-title-with-logo > span {
        min-width: 0;
      }

      .summary-title-logo {
        width: 22px;
        height: 22px;
        border-radius: 6px;
        object-fit: cover;
        border: 1px solid #dce7f2;
        flex: 0 0 auto;
      }

      .summary-sub {
        color: var(--muted);
        font-size: 12px;
      }

      .summary-right {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
      }
      .error-title-wrap {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }
      .error-title-text {
        min-width: 0;
      }
      .error-icon {
        width: 20px;
        height: 20px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        border: 1px solid #d1dbe6;
        background: #f2f7fd;
        color: #28577a;
        flex: 0 0 auto;
      }
      .error-icon.critical {
        border-color: #f1c1c1;
        background: #feecec;
        color: #992727;
      }
      .error-icon.decline {
        border-color: #efd8a1;
        background: #fff6e2;
        color: #7c5b00;
      }
      .error-icon.warn {
        border-color: #c9d8e6;
        background: #edf4fb;
        color: #2f5a86;
      }
      .error-icon.info {
        border-color: #d5dce4;
        background: #f4f7fb;
        color: #4a6278;
      }
      .error-severity-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 4px 8px;
        white-space: nowrap;
        border: 1px solid #c7d4e2;
        background: #edf4fb;
        color: #2f5a86;
      }
      .error-severity-pill.critical {
        border-color: #f1c1c1;
        background: #feecec;
        color: #992727;
      }
      .error-severity-pill.decline {
        border-color: #efd8a1;
        background: #fff6e2;
        color: #7c5b00;
      }
      .error-severity-pill.warn {
        border-color: #c7d4e2;
        background: #edf4fb;
        color: #2f5a86;
      }
      .error-severity-pill.info {
        border-color: #d5dce4;
        background: #f4f7fb;
        color: #4a6278;
      }

      .payment-method-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        line-height: 1;
        font-weight: 700;
        border-radius: 999px;
        padding: 5px 9px;
        white-space: nowrap;
        border: 1px solid #c8d6e5;
        background: #f2f7fd;
        color: #264662;
      }

      .payment-method-pill svg {
        width: 14px;
        height: 14px;
        display: block;
        flex: 0 0 auto;
      }

      .payment-method-pill.card {
        border-color: #c8d6e5;
        background: #f2f7fd;
        color: #264662;
      }

      .payment-method-pill.paypal {
        border-color: #b4d2ef;
        background: #ecf5ff;
        color: #165a9a;
      }

      .payment-method-pill.check {
        border-color: #bfd8cb;
        background: #eef8f1;
        color: #1f6b43;
      }

      .ledger-warning-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px solid #efd17a;
        background: #fff6d8;
        color: #7a5a00;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 4px 8px;
        white-space: nowrap;
      }

      .ledger-warning-pill.is-critical {
        border-color: #e4a8a8;
        background: #fff1f1;
        color: #9a1f1f;
      }

      .ledger-link-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px solid #c7d4e2;
        background: #edf4fb;
        color: #2f5a86;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 4px 8px;
        white-space: nowrap;
      }

      .ledger-link-pill.linked {
        border-color: #b9d8c2;
        background: #ecf8ef;
        color: #1e6a3f;
      }

      .ledger-link-pill.missing {
        border-color: #e4a8a8;
        background: #fff1f1;
        color: #9a1f1f;
      }

      .payment-source-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 4px 8px;
        white-space: nowrap;
        border: 1px solid #c7d4e2;
        background: #edf4fb;
        color: #2f5a86;
      }

      .payment-source-pill.import_sync {
        border-color: #b9d8c2;
        background: #ecf8ef;
        color: #1e6a3f;
      }

      .payment-source-pill.legacy_import {
        border-color: #ead49f;
        background: #fff5dd;
        color: #7b5a00;
      }

      .payment-source-pill.native {
        border-color: #d5dce4;
        background: #f4f7fb;
        color: #4a6278;
      }

      .payment-kind-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 4px 8px;
        white-space: nowrap;
        border: 1px solid #d5dce4;
        background: #f4f7fb;
        color: #4a6278;
      }

      .payment-kind-pill.renewal {
        border-color: #b4d2ef;
        background: #ecf5ff;
        color: #165a9a;
      }

      .payment-kind-pill.signup {
        border-color: #b9d8c2;
        background: #ecf8ef;
        color: #1e6a3f;
      }

      .payment-kind-pill.activation {
        border-color: #e3c9d8;
        background: #f9eef4;
        color: #7b3f61;
      }

      .payment-kind-pill.import,
      .payment-kind-pill.reconcile {
        border-color: #ead49f;
        background: #fff5dd;
        color: #7b5a00;
      }

      .gateway-processor-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        line-height: 1;
        font-weight: 700;
        border-radius: 999px;
        padding: 5px 9px;
        white-space: nowrap;
        border: 1px solid #d3dde7;
        background: #f4f8fc;
        color: #3b546d;
      }

      .gateway-processor-icon {
        width: 14px;
        height: 14px;
        display: block;
        flex: 0 0 auto;
      }

      .gateway-processor-icon-other {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        border-radius: 999px;
        border: 1px solid rgba(52, 74, 96, 0.35);
        background: rgba(52, 74, 96, 0.08);
        color: #344a60;
        font-size: 10px;
        font-weight: 900;
      }

      .gateway-processor-pill.authorize {
        border-color: #bcd5ea;
        background: #eef6fd;
        color: #1d5a8b;
      }

      .gateway-processor-pill.converge {
        border-color: #c7d9cd;
        background: #edf8f0;
        color: #1f6a42;
      }

      .gateway-processor-pill.paypal {
        border-color: #b7d0ea;
        background: #edf5ff;
        color: #1d5e9a;
      }

      .gateway-processor-pill.other {
        border-color: #d3dde7;
        background: #f4f8fc;
        color: #3b546d;
      }

      .summary-right-stack {
        display: grid;
        justify-items: end;
        gap: 6px;
      }

      .id-rail {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .id-rail-pill {
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        border: 1px solid #d7e3ee;
        background: #f4f8fc;
        color: #506578;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        padding: 4px 8px;
        letter-spacing: .01em;
      }

      .summary-caret {
        font-size: 14px;
        color: #6b7c8f;
        transition: transform 0.2s ease;
      }

      .summary-item[open] .summary-caret {
        transform: rotate(180deg);
      }

      .summary-body {
        border-top: 1px solid #edf2f7;
        padding: 10px;
        display: grid;
        gap: 10px;
      }

      .summary-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 8px;
      }

      .summary-field .k {
        font-size: 11px;
        color: #687a8d;
        text-transform: uppercase;
      }

      .summary-field .v {
        font-size: 13px;
        font-weight: 700;
        color: #243547;
      }

      .identity-profiles {
        display: grid;
        gap: 6px;
      }

      .identity-profile {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 6px 8px;
        border: 1px solid #e5edf5;
        border-radius: 10px;
        background: #f8fbff;
      }

      .identity-logo {
        width: 20px;
        height: 20px;
        border-radius: 6px;
        object-fit: cover;
        border: 1px solid #dce7f2;
        flex: 0 0 auto;
      }

      .identity-text {
        min-width: 0;
        display: grid;
        gap: 1px;
      }

      .identity-platform {
        font-size: 11px;
        color: #4f6478;
        text-transform: uppercase;
        letter-spacing: .02em;
      }

      .identity-name {
        font-size: 13px;
        font-weight: 700;
        color: #223446;
        line-height: 1.2;
        word-break: break-word;
      }

      pre.raw {
        margin: 6px 0 0 0;
        padding: 10px 12px;
        border: 1px solid #d9e3ed;
        border-radius: 12px;
        background: #0b1220;
        color: #e6edf3;
        font-size: 12px;
        line-height: 1.35;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        white-space: pre-wrap;
        word-break: break-word;
        max-height: 260px;
        overflow: auto;
      }

      .summary-actions {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
      }

      .summary-empty {
        padding: 12px;
        text-align: center;
        color: var(--muted);
      }

      @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
      }

      .skeleton {
        display: inline-block;
        border-radius: 999px;
        background: linear-gradient(90deg, #edf3f9 0%, #f7fbff 45%, #edf3f9 100%);
        background-size: 200% 100%;
        animation: shimmer 1.25s ease-in-out infinite;
      }

      .sk-title { width: 180px; height: 14px; }
      .sk-sub { width: 140px; height: 12px; opacity: 0.85; }
      .sk-chip { width: 64px; height: 22px; border-radius: 999px; }
      .sk-row { width: 100%; max-width: 240px; height: 12px; opacity: 0.9; }

      .bar-list { display: grid; gap: 8px; }
      .bar-row { display: grid; grid-template-columns: 120px 1fr 88px; gap: 10px; align-items: center; }
      .bar-label { font-size: 12px; color: #516173; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .bar-track { height: 10px; border-radius: 999px; background: rgba(81,97,115,.12); overflow: hidden; }
      .bar-fill { height: 100%; border-radius: 999px; }
      .bar-value { font-size: 12px; color: #152235; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

      .list-mobile {
        display: grid;
        gap: 9px;
        padding: 10px;
      }

      .sub-card {
        border: 1px solid #e0e8f0;
        border-radius: 12px;
        padding: 10px;
        background: #fff;
      }

      .sub-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
      }

      .sub-title { font-weight: 700; }
      .muted { color: var(--muted); font-size: 12px; }

      .sub-meta {
        margin-top: 10px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .sub-meta .k { font-size: 11px; color: #687a8d; text-transform: uppercase; }
      .sub-meta .v { font-size: 13px; font-weight: 700; color: #243547; }

      .sub-actions {
        margin-top: 10px;
        display: flex;
        justify-content: flex-end;
      }

      .table-wrap {
        display: none;
        width: 100%;
        max-width: 100%;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: auto;
        pointer-events: auto;
      }
      table { width: max-content; border-collapse: collapse; min-width: 100%; }
      .subscribers-section table { min-width: 980px; }
      th, td {
        text-align: left;
        border-bottom: 1px solid #e7edf4;
        padding: 11px 12px;
        white-space: nowrap;
      }

      th {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #5c6e81;
        background: #fcfdff;
      }

      th.sortable { cursor: pointer; }

      .chip {
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 800;
        padding: 4px 10px;
      }

      .chip.active { background: var(--ok-bg); color: #1d7e51; }
      .chip.pending { background: var(--pending-bg); color: #225f9e; }
      .chip.expired { background: var(--expired-bg); color: #963535; }
      .chip.churned { background: #171d27; color: #f5f7fa; border: 1px solid #171d27; }

      .text-btn {
        border: 0;
        background: transparent;
        color: #2969af;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }
      .text-btn.warn-link { color: #986100; }
      .text-btn.danger-link { color: #a12f28; }

      .foot {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
      }

      .pager { display: flex; gap: 8px; }
      .empty {
        padding: 18px 12px;
        text-align: center;
        color: var(--muted);
      }

      .panel { padding: 10px; }

      body.auth .content {
        min-height: 100vh;
        padding: 24px 12px;
        align-content: center;
        justify-items: center;
      }

      .auth-card {
        width: min(560px, 100%);
        padding: 22px;
        box-shadow: 0 18px 40px rgba(9, 18, 28, 0.12);
      }

      .auth-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 14px;
      }

      .auth-app-logo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid #bdccd9;
        background: #fff;
      }

      .auth-app-name {
        font-weight: 900;
        letter-spacing: 0.01em;
        color: #1f2b38;
      }

      .auth-actions { margin-top: 14px; }

      .auth-sso-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-decoration: none;
      }

      .auth-provider-logo {
        width: 18px;
        height: 18px;
        object-fit: contain;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.16);
      }

      .auth-divider {
        margin: 14px 0 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .auth-divider::before,
      .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #dde6ef;
      }

      .auth-divider span {
        padding: 0 6px;
      }

      .auth-alt {
        display: grid;
        gap: 4px;
        justify-items: center;
        text-align: center;
      }

      body.auth a.text-btn { text-decoration: none; }

      .not-found {
        padding: 18px;
      }

      .not-found .btn {
        text-decoration: none;
      }

      .not-found-inner {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
      }

      .not-found-code {
        font-size: 42px;
        font-weight: 900;
        color: #2a3f54;
        letter-spacing: 0.02em;
      }
      .modal-overlay {
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: rgba(44, 53, 66, 0.5);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: grid;
        align-items: center;
        justify-items: center;
        padding: 12px;
      }

      .modal-card {
        width: min(980px, 100%);
        position: relative;
        z-index: 10001;
        max-height: calc(100vh - 24px);
        overflow: auto;
        border: 1px solid #ccdae8;
        border-radius: 14px;
        background: rgba(248, 251, 255, 0.96);
        box-shadow: 0 20px 50px rgba(8, 18, 28, 0.35);
        padding: 12px;
      }

      .modal-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .modal-close {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid #bfcddd;
        background: #fff;
        color: #2a3949;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
      }

      .global-loader {
        position: fixed;
        right: 14px;
        bottom: 14px;
        z-index: 80;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 999px;
        border: 1px solid rgba(180, 200, 220, 0.8);
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 16px 40px rgba(8, 18, 28, 0.18);
        opacity: 0;
        transform: translateY(6px);
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
      }

      .global-loader .label {
        font-size: 12px;
        font-weight: 800;
        color: #223244;
        letter-spacing: 0.02em;
      }

      .global-loader .spinner {
        width: 16px;
        height: 16px;
        border-radius: 999px;
        border: 2px solid rgba(30, 70, 110, 0.22);
        border-top-color: rgba(30, 70, 110, 0.9);
        animation: spin 0.8s linear infinite;
      }

      @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
      }

      .inline-loader {
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }

      .throbber {
        width: 16px;
        height: 16px;
        border-radius: 999px;
        border: 2px solid rgba(30, 70, 110, 0.22);
        border-top-color: rgba(30, 70, 110, 0.9);
        animation: spin 0.8s linear infinite;
        flex: 0 0 auto;
      }

      .inline-loader .label {
        font-size: 12px;
        font-weight: 800;
        color: #223244;
        letter-spacing: 0.02em;
      }

      body.is-loading .global-loader,
      body.is-hydrating .global-loader {
        opacity: 1;
        transform: translateY(0);
      }

      .dehydrated-overlay {
        position: fixed;
        inset: 0;
        z-index: 120;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: rgba(245, 249, 255, 0.9);
        backdrop-filter: blur(6px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
      }

      body.is-dehydrated .dehydrated-overlay {
        opacity: 1;
        pointer-events: auto;
      }

      .dehydrated-card {
        width: min(520px, 100%);
        border-radius: 16px;
        border: 1px solid rgba(190, 210, 230, 0.9);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 24px 70px rgba(8, 18, 28, 0.2);
        padding: 16px;
        display: grid;
        gap: 10px;
        justify-items: center;
        text-align: center;
      }

      .dehydrated-spinner {
        width: 22px;
        height: 22px;
        border-radius: 999px;
        border: 3px solid rgba(30, 70, 110, 0.16);
        border-top-color: rgba(30, 70, 110, 0.9);
        animation: spin 0.8s linear infinite;
      }

      .dehydrated-title {
        font-weight: 900;
        color: #162434;
      }

      .dehydrated-meta {
        color: #52677c;
        font-size: 13px;
      }

      .dehydrated-overlay noscript {
        position: absolute;
        left: 18px;
        right: 18px;
        bottom: 18px;
        display: flex;
        justify-content: center;
        pointer-events: none;
      }

      .dehydrated-noscript {
        font-size: 12px;
        color: #4e6377;
      }

      .detail-grid {
        margin-top: 12px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 10px;
      }

      .detail {
        border: 1px solid #dbe6f0;
        border-radius: 12px;
        background: linear-gradient(180deg, #ffffff, #f8fbff);
        padding: 11px 12px;
      }

      .detail .k { font-size: 10px; color: #6d8093; text-transform: uppercase; letter-spacing: .04em; }
      .detail .v { margin-top: 5px; font-size: 14px; font-weight: 700; color: #1e3145; line-height: 1.25; word-break: break-word; }

      .account-hero {
        margin-top: 10px;
        border: 1px solid #d4e1ed;
        border-radius: 14px;
        background: linear-gradient(135deg, #fdfefe 0%, #f2f8ff 100%);
        padding: 12px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
      }

      .account-hero-main {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
      }

      .account-hero-logo {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        object-fit: cover;
        border: 1px solid #cfdeea;
        background: #fff;
        flex: 0 0 auto;
      }

      .account-hero-copy {
        min-width: 0;
        display: grid;
        gap: 3px;
      }

      .account-hero-name {
        font-size: 20px;
        font-weight: 900;
        line-height: 1.1;
        color: #18304a;
        word-break: break-word;
      }

      .account-hero-platform {
        font-size: 12px;
        color: #567087;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .03em;
      }

      .account-hero-side {
        display: grid;
        justify-items: end;
        gap: 8px;
        min-width: 260px;
      }

      .account-hero-ids {
        display: grid;
        gap: 6px;
        width: 100%;
      }

      .account-hero-id {
        display: grid;
        gap: 2px;
        justify-items: end;
        text-align: right;
      }

      .account-hero-id .k {
        font-size: 10px;
        color: #6b8094;
        text-transform: uppercase;
        letter-spacing: .04em;
      }

      .account-hero-id .v {
        font-size: 11px;
        color: #33495d;
        font-weight: 700;
        max-width: 100%;
        word-break: break-all;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      }

      .account-card-alert {
        margin-top: 10px;
        border: 1px solid #efd5af;
        border-radius: 12px;
        background: #fff5e8;
        padding: 9px 11px;
        color: #7a5313;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.35;
      }

      .merge-block {
        margin-top: 12px;
        border: 1px solid #dce6ef;
        border-radius: 12px;
        background: #f9fbfe;
        padding: 10px;
      }

      .billing-block {
        margin-top: 12px;
        border: 1px solid #dce6ef;
        border-radius: 12px;
        background: #f9fbfe;
        padding: 10px;
      }

      .merge-list {
        margin-top: 8px;
        display: grid;
        gap: 8px;
      }

      .merge-item {
        border: 1px solid #dde6f0;
        border-radius: 10px;
        padding: 8px;
        background: #fff;
      }

      .history { margin-top: 10px; }
      .history h4 { margin: 0 0 6px; font-size: 14px; }
      .history-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: auto;
      }
      .hidden { display: none; }

      .fh-job-hidden { display: none !important; }

      .fh-job-widget {
        position: fixed;
        left: 18px;
        bottom: 18px;
        z-index: 141;
      }

      .fh-job-launcher {
        width: 58px;
        height: 58px;
        border-radius: 999px;
        border: 1px solid #204f85;
        background: #17416f;
        color: #fff;
        box-shadow: 0 10px 24px rgba(13, 36, 60, 0.28);
        position: relative;
        display: grid;
        place-items: center;
        cursor: pointer;
      }

      .fh-job-ring {
        position: absolute;
        inset: 4px;
        border-radius: 999px;
        border: 3px solid rgba(255, 255, 255, 0.35);
        background: conic-gradient(#58c6ff calc(var(--job-progress, 0) * 1%), rgba(255, 255, 255, 0.15) 0);
      }

      .fh-job-ring.active {
        animation: fh-job-spin 1s linear infinite;
      }

      .fh-job-ring.active.unknown {
        background: conic-gradient(#58c6ff 0 28%, rgba(255, 255, 255, 0.14) 28% 100%);
      }

      .fh-job-count {
        position: relative;
        z-index: 1;
        font-size: 14px;
        font-weight: 900;
      }

      .fh-job-count.is-wrench {
        display: grid;
        place-items: center;
      }

      .fh-job-count.is-wrench .fh-job-wrench {
        width: 16px;
        height: 16px;
        display: block;
        color: #fff;
      }

      .fh-job-launcher.active {
        background: #1c5f9c;
      }

      .fh-job-panel {
        position: absolute;
        left: 0;
        bottom: 68px;
        width: min(380px, calc(100vw - 22px));
        max-height: min(70vh, 520px);
        border: 1px solid #cddced;
        border-radius: 12px;
        background: #f7fbff;
        box-shadow: 0 16px 36px rgba(18, 44, 72, 0.26);
        overflow: hidden;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
      }

      .fh-job-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid #d7e5f3;
        background: linear-gradient(180deg, #edf5fd, #e5f0fb);
      }

      .fh-job-title {
        font-size: 13px;
        font-weight: 900;
        color: #143652;
      }

      .fh-job-close {
        width: 26px;
        height: 26px;
        border-radius: 999px;
        border: 1px solid #c2d3e5;
        background: #fff;
        color: #22425d;
        cursor: pointer;
      }

      .fh-job-meta {
        padding: 8px 12px;
        font-size: 11px;
        color: #56758f;
        border-bottom: 1px solid #e2ebf5;
      }

      .fh-job-list {
        overflow: auto;
        padding: 10px 12px;
        display: grid;
        gap: 8px;
      }

      .fh-job-empty {
        font-size: 12px;
        color: #5d788f;
      }

      .fh-job-divider {
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px dashed #d6e4f2;
        font-size: 11px;
        color: #55748f;
        font-weight: 700;
      }

      .fh-job-row {
        border: 1px solid #d8e6f3;
        border-radius: 10px;
        background: #fff;
        padding: 8px;
      }

      .fh-job-row.is-expanded {
        border-color: #a9c8e4;
        box-shadow: inset 0 0 0 1px #dbeafb;
      }

      .fh-job-row-toggle {
        appearance: none;
        border: 0;
        background: transparent;
        color: inherit;
        width: 100%;
        padding: 0;
        margin: 0;
        text-align: left;
        cursor: pointer;
      }

      .fh-job-row.is-recent {
        border-style: dashed;
        opacity: 0.93;
      }

      .fh-job-row-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .fh-job-row-main {
        margin-top: 4px;
        font-size: 11px;
        color: #284764;
        word-break: break-word;
      }

      .fh-job-detail {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed #d7e5f3;
      }

      .fh-job-detail-meta {
        font-size: 11px;
        color: #365774;
        line-height: 1.3;
      }

      .fh-job-detail-bits {
        margin-top: 4px;
        font-size: 11px;
        color: #32506a;
        word-break: break-word;
      }

      .fh-job-detail-log {
        margin: 8px 0 0;
        padding: 8px;
        border: 1px solid #d8e6f3;
        border-radius: 8px;
        background: #f7fbff;
        color: #2e4b65;
        font-size: 11px;
        line-height: 1.35;
        max-height: 180px;
        overflow: auto;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .fh-job-when {
        font-size: 10px;
        color: #597a95;
      }

      .fh-job-badge {
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.01em;
        text-transform: uppercase;
        color: #35536d;
        background: #e7eef7;
        border: 1px solid #d5e2ef;
        border-radius: 999px;
        padding: 2px 7px;
      }

      .fh-job-badge.is-running {
        color: #0f5a84;
        background: #dff2ff;
        border-color: #bbe5ff;
      }

      .fh-job-badge.is-queued {
        color: #6b4a13;
        background: #fff4db;
        border-color: #f5dfac;
      }

      .fh-job-pill {
        border: 1px solid #c7d7e8;
        background: #f2f7fd;
        color: #21405c;
        border-radius: 999px;
        padding: 5px 10px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
      }

      .fh-job-pill.active {
        background: #e1f3ff;
        border-color: #96d7ff;
        color: #0b4f79;
      }

      .fh-job-pill-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #7c96ad;
        box-shadow: 0 0 0 0 rgba(88, 198, 255, 0.45);
      }

      .fh-job-pill-dot.active {
        background: #2ea3e1;
        animation: fh-job-pulse 1.1s ease-out infinite;
      }

      .fh-job-pill-label {
        line-height: 1;
      }

      @keyframes fh-job-spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
      }

      @keyframes fh-job-pulse {
        0% { box-shadow: 0 0 0 0 rgba(46, 163, 225, 0.45); }
        70% { box-shadow: 0 0 0 8px rgba(46, 163, 225, 0); }
        100% { box-shadow: 0 0 0 0 rgba(46, 163, 225, 0); }
      }

      .fh-chat-widget {
        position: fixed;
        right: 18px;
        bottom: 18px;
        z-index: 140;
        display: grid;
        gap: 8px;
        align-items: end;
        justify-items: end;
      }

      .fh-chat-widget.fh-chat-widget-open .fh-chat-launcher {
        display: none !important;
      }

      .fh-chat-widget.fh-chat-widget-full {
        left: 10px;
        right: 10px;
        top: calc(var(--topbar-height) + var(--module-strip-height) + 8px);
        bottom: 10px;
        display: block;
      }

      .fh-chat-widget.fh-chat-widget-full .fh-chat-panel {
        width: 100%;
        max-height: 100%;
        height: 100%;
      }

      .fh-chat-widget.fh-chat-widget-full .fh-chat-launcher,
      .fh-chat-widget.fh-chat-widget-full .fh-chat-stack {
        display: none !important;
      }

      .fh-chat-stack {
        display: flex;
        flex-wrap: wrap-reverse;
        gap: 6px;
        justify-content: flex-end;
        max-width: min(325px, calc(100vw - 20px));
      }

      .fh-chat-avatar-chip {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 2px solid #fff;
        box-shadow: 0 8px 24px rgba(15, 23, 35, 0.25);
        position: relative;
        background: #1f2d3b;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.18s ease, margin-left 0.22s ease, box-shadow 0.18s ease;
      }

      .fh-chat-avatar-chip img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }

      .fh-chat-avatar-chip-fallback {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        color: #e9f2fa;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        background: linear-gradient(135deg, #2e4760, #1d2f42);
      }

      .fh-chat-launcher {
        width: 58px;
        height: 58px;
        border-radius: 999px;
        border: 1px solid #1f4f85;
        background: #1f4f85;
        color: #fff;
        box-shadow: 0 10px 24px rgba(17, 42, 70, 0.28);
        cursor: pointer;
        position: relative;
        display: grid;
        place-items: center;
      }

      .fh-chat-launcher-icon {
        width: 25px;
        height: 25px;
        display: block;
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8.93 8.93 0 0 1-.9 3.9 9 9 0 0 1-8.1 5.1 8.93 8.93 0 0 1-3.9-.9L3 21l.9-5.1A8.93 8.93 0 0 1 3 12a9 9 0 0 1 9-9 8.93 8.93 0 0 1 3.9.9A9 9 0 0 1 21 12z'/%3E%3C/svg%3E");
      }
      .fh-chat-launcher-faces {
        position: relative;
        width: 44px;
        height: 26px;
        display: block;
      }
      .fh-chat-launcher-face {
        position: absolute;
        top: 1px;
        width: 24px;
        height: 24px;
        border-radius: 999px;
        border: 2px solid #1f4f85;
        background: #dce9f7;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(12, 32, 54, 0.32);
      }
      .fh-chat-launcher-face img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }
      .fh-chat-launcher-face-fallback {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        font-size: 9px;
        font-weight: 800;
        color: #1f3953;
        text-transform: uppercase;
        background: linear-gradient(135deg, #cfe0f2, #bcd2e8);
      }
      .fh-chat-launcher.fh-chat-launcher-has-faces .fh-chat-launcher-icon {
        display: none;
      }

      .fh-chat-launcher:hover {
        filter: brightness(1.03);
      }

      .fh-chat-launcher-unread {
        position: absolute;
        top: -3px;
        right: -3px;
        min-width: 20px;
        height: 20px;
        border-radius: 999px;
        padding: 0 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 800;
        color: #fff;
        background: #c43a3a;
        border: 2px solid #fff;
      }

      .fh-chat-panel {
        width: min(325px, calc(100vw - 20px));
        height: min(78vh, 680px);
        max-height: min(78vh, 680px);
        border: 1px solid #cfdceb;
        border-radius: 14px;
        overflow: hidden;
        background: #f6faff;
        box-shadow: 0 16px 40px rgba(22, 48, 79, 0.2);
        color: #173047;
        display: grid;
        grid-template-rows: auto 1fr;
      }

      .fh-chat-head {
        background: linear-gradient(180deg, #eef5fd, #e6f0fb);
        border-bottom: 1px solid #c9d8e8;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
      }

      .fh-chat-head-title {
        font-size: 13px;
        font-weight: 900;
        color: #183854;
      }

      .fh-chat-head-peer {
        margin-left: 4px;
        margin-right: auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .fh-chat-head-peer-empty {
        font-size: 11px;
        color: #567694;
      }

      .fh-chat-avatar-head {
        width: 30px;
        height: 30px;
        border-radius: 999px;
        border: 1px solid #bad0e4;
        background: #dce9f7;
        position: relative;
        overflow: hidden;
        flex: 0 0 auto;
      }

      .fh-chat-avatar-head img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }

      .fh-chat-avatar-chip-fallback,
      .fh-chat-avatar-head .fh-chat-avatar-chip-fallback {
        width: 100%;
        height: 100%;
      }

      .fh-chat-head-peer-main {
        min-width: 0;
        display: grid;
      }

      .fh-chat-head-peer-name {
        font-size: 12px;
        font-weight: 800;
        color: #173651;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 145px;
      }

      .fh-chat-head-peer-status {
        font-size: 10px;
        color: #567694;
      }

      .fh-chat-head-meta {
        margin-left: auto;
        font-size: 12px;
        color: #577694;
      }

      .fh-chat-close {
        border: 1px solid #bdd1e6;
        background: #ffffff;
        color: #34506d;
        border-radius: 8px;
        width: 30px;
        height: 30px;
        cursor: pointer;
      }

      .fh-chat-body {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        overflow: hidden;
      }

      .fh-chat-peers {
        border-right: 1px solid #cfdeed;
        background: #f0f6fc;
        overflow: auto;
        display: none;
      }

      .fh-chat-directory {
        border-left: 1px solid #cfdeed;
        background: #f4f8fd;
        overflow: auto;
      }

      .fh-chat-dir-title {
        position: sticky;
        top: 0;
        z-index: 1;
        padding: 8px 10px;
        background: #eaf3fb;
        border-bottom: 1px solid #cfdeed;
        font-size: 11px;
        font-weight: 800;
        color: #486a89;
        text-transform: uppercase;
      }

      .fh-chat-dir-item {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        width: 100%;
        border: 0;
        border-bottom: 1px solid #d8e4f1;
        background: transparent;
        text-align: left;
        padding: 8px 10px;
        cursor: pointer;
        color: #1f3c56;
      }

      .fh-chat-dir-item:hover {
        background: #e7f1fb;
      }

      .fh-chat-dir-action {
        font-size: 12px;
        font-weight: 800;
        color: #1f5e96;
      }

      .fh-chat-panel-popout {
        width: min(820px, calc(100vw - 24px));
      }

      .fh-chat-panel-popout .fh-chat-body {
        grid-template-columns: 210px minmax(0, 1fr);
      }

      .fh-chat-panel-popout .fh-chat-peers {
        display: block;
      }

      .fh-chat-panel-popout .fh-chat-directory {
        display: none;
      }

      .fh-chat-peer {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        border: 0;
        width: 100%;
        text-align: left;
        padding: 9px 10px;
        cursor: pointer;
        color: #1f3c56;
        background: transparent;
        border-bottom: 1px solid #d8e4f1;
      }

      .fh-chat-peer:hover {
        background: #e7f1fb;
      }

      .fh-chat-peer.active {
        background: #d8eafc;
      }

      .fh-chat-avatar {
        width: 38px;
        height: 38px;
        border-radius: 999px;
        border: 1px solid #b7cce0;
        background: #dce9f7;
        position: relative;
        overflow: hidden;
      }

      .fh-chat-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }

      .fh-chat-avatar-fallback {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        font-size: 11px;
        font-weight: 800;
        color: #1f3953;
        text-transform: uppercase;
        background: linear-gradient(135deg, #cfe0f2, #bcd2e8);
      }

      .fh-chat-presence {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 11px;
        height: 11px;
        border-radius: 999px;
        border: 2px solid #f6faff;
        background: #8a97a6;
      }

      .fh-chat-presence.online {
        background: #2bb06d;
      }

      .fh-chat-presence.idle {
        background: #d7a531;
      }

      .fh-chat-mini-action {
        min-width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid #a8c3dc;
        background: #edf4fc;
        color: #1f4f85;
        font-size: 11px;
        font-weight: 800;
        padding: 0 9px;
        cursor: pointer;
      }

      .fh-chat-mini-action:hover {
        background: #dfeefa;
      }

      .fh-chat-mini-all {
        border-radius: 999px;
        min-width: 50px;
      }

      @media (min-width: 901px) {
        .fh-chat-stack {
          flex-wrap: nowrap;
          gap: 0;
          align-items: center;
        }

        .fh-chat-stack .fh-chat-avatar-chip {
          margin-left: -12px;
        }

        .fh-chat-stack .fh-chat-avatar-chip:first-child {
          margin-left: 0;
        }

        .fh-chat-stack:hover .fh-chat-avatar-chip {
          margin-left: 4px;
        }

        .fh-chat-stack:hover .fh-chat-avatar-chip:first-child {
          margin-left: 0;
        }

        .fh-chat-stack .fh-chat-avatar-chip:hover {
          transform: translateY(-2px) scale(1.04);
          box-shadow: 0 10px 26px rgba(15, 23, 35, 0.32);
          z-index: 5;
        }

        .fh-chat-stack .fh-chat-mini-action {
          margin-left: 6px;
        }
      }

      .fh-chat-peer-main {
        min-width: 0;
        display: grid;
        gap: 2px;
      }

      .fh-chat-peer-name {
        font-size: 12px;
        font-weight: 800;
        color: #1b3954;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .fh-chat-peer-preview {
        font-size: 11px;
        color: #567694;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .fh-chat-peer-unread {
        min-width: 18px;
        height: 18px;
        border-radius: 999px;
        padding: 0 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 800;
        color: #fff;
        background: #c43a3a;
        border: 1px solid #f6d5d5;
      }

      .fh-chat-thread-wrap {
        display: grid;
        grid-template-rows: 1fr auto;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
      }

      .fh-chat-thread {
        padding: 12px;
        overflow: auto;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-height: 0;
      }

      .fh-chat-msg {
        max-width: 84%;
        padding: 6px 9px;
        border-radius: 10px;
        border: 1px solid #cadcf0;
        background: #eff6ff;
        font-size: 12px;
        line-height: 1.25;
        word-break: break-word;
      }

      .fh-chat-msg.me {
        align-self: flex-end;
        border-color: #aac9e5;
        background: #dff0ff;
      }

      .fh-chat-msg-head {
        margin-bottom: 2px;
        font-size: 10px;
        color: #5f7f9f;
      }

      .fh-chat-msg-body {
        color: #173955;
      }

      .fh-chat-msg-body a {
        color: #1667aa;
        text-decoration: underline;
      }

      .fh-chat-inline-img {
        margin-top: 4px;
        max-width: min(280px, 70vw);
        max-height: 240px;
        border-radius: 8px;
        border: 1px solid #b9cfe5;
        background: #f3f8fe;
        display: block;
      }

      .fh-chat-compose {
        border-top: 1px solid #cfdeee;
        background: #f1f7fd;
        padding: 10px;
        display: grid;
        gap: 8px;
      }

      .fh-chat-compose textarea {
        width: 100%;
        min-height: 62px;
        max-height: 128px;
        resize: none;
        border: 1px solid #b7cde3;
        border-radius: 8px;
        background: #ffffff;
        color: #173954;
        padding: 8px;
        font-size: 13px;
      }

      .fh-chat-compose.dragover textarea {
        border-color: #3f78ae;
        box-shadow: 0 0 0 2px rgba(63, 120, 174, 0.15);
      }

      .fh-chat-compose-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .fh-chat-compose-left {
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        gap: 7px;
      }

      .fh-chat-attach {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        border: 1px solid #9fbddb;
        background: #ffffff;
        color: #215887;
        font-size: 17px;
        line-height: 1;
        font-weight: 800;
        display: grid;
        place-items: center;
        cursor: pointer;
        padding: 0;
      }

      .fh-chat-attach:hover {
        background: #e8f3fd;
      }

      .fh-chat-attach:disabled {
        opacity: 0.55;
        cursor: default;
      }

      .fh-chat-attach-input {
        display: none;
      }

      .fh-chat-compose-meta {
        font-size: 11px;
        color: #5c7b99;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .fh-chat-compose button:not(.fh-chat-attach) {
        border: 1px solid #1f4f85;
        background: #1f4f85;
        color: #fff;
        border-radius: 8px;
        padding: 7px 12px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
      }

      .fh-chat-empty {
        padding: 14px;
        font-size: 12px;
        color: #617f9b;
      }

      .fh-chat-hidden {
        display: none !important;
      }
      body.fh-chat-mobile-open {
        overflow: hidden;
        overscroll-behavior: none;
      }
      body.modal-open {
        overflow: hidden;
      }
      /* Ensure modals always overlay sticky top/side UI (some browsers create stacking quirks). */
      body.modal-open .topbar,
      body.modal-open .module-strip,
      body.modal-open .sidebar,
      body.modal-open .layout.sidebar-open::before,
      body.modal-open .selector-picker-menu {
        z-index: 1 !important;
      }
      body.modal-open .modal-overlay { z-index: 200000 !important; }
      body.modal-open .modal-card { z-index: 200001 !important; }

      body.acct-only .topbar,
      body.acct-only .module-strip,
      body.acct-only .layout {
        display: none;
      }

      @media (min-width: 760px) {
        .content { padding: 16px; }
        .head { display: flex; justify-content: space-between; align-items: flex-end; }
        .metrics-grid { grid-template-columns: repeat(4, 1fr); }
        .row { flex-direction: row; justify-content: space-between; align-items: center; }
        .sub-meta { grid-template-columns: 1fr 1fr; }
        .detail-grid { grid-template-columns: repeat(2, 1fr); }
        .foot { flex-direction: row; justify-content: space-between; align-items: center; }
      }

      @media (min-width: 1180px) {
        .list-mobile { display: none; }
        .table-wrap { display: block; }
        .layout.sidebar-open::before { display: none; }
      }

      @media (max-width: 1179px) {
        .sidebar {
          position: absolute;
          z-index: 80;
          height: calc(100vh - 62px);
          width: min(300px, 82vw);
          max-width: 82vw;
          transform: translateX(-100%);
        }

        .sidebar.hidden { transform: translateX(-100%); }
        .sidebar:not(.hidden) { transform: translateX(0); }
      }

      @media (max-width: 760px) {
        .content { padding: 8px; gap: 6px; }
        .card { border-radius: 12px; }
        .search { padding: 6px 8px; }
        .field { margin-top: 7px; }
        .field input,
        .field select,
        .selector-picker-btn { padding: 9px; }
        .actions { margin-top: 8px; gap: 6px; }
        .btn { padding: 9px 11px; font-size: 12px; }
        .search-helper { margin-top: 8px; padding: 7px 8px; }
        .tag { padding: 4px 8px; font-size: 11px; }
        .modal-overlay { padding: 0; }
        .modal-card {
          width: 100%;
          height: 100%;
          max-height: 100%;
          border-radius: 0;
          border-left: 0;
          border-right: 0;
        }

        body.search-focus-mode .topbar {
          position: fixed;
          left: 0;
          right: 0;
          transform: translateY(-100%);
          opacity: 0;
          pointer-events: none;
        }
        body.search-focus-mode .module-strip {
          display: none;
        }

        body.search-focus-mode .layout {
          min-height: 100vh;
        }

        body.search-focus-mode .head,
        body.search-focus-mode .metrics {
          display: none;
        }

        body.search-focus-mode .search .row {
          display: block;
        }

        body.search-focus-mode .search-head h3 {
          display: none;
        }

        body.search-focus-mode .search .actions {
          margin-top: 6px;
        }

        body.search-focus-mode .content {
          padding: 0;
          gap: 0;
        }

        body.search-focus-mode #view-subscribers .search {
          position: fixed;
          top: 0;
          z-index: 40;
          border-radius: 0;
          border-left: 0;
          border-right: 0;
          border-top: 0;
          margin: 0;
          padding: 6px 8px 8px;
        }

        #view-plans .panel,
        #view-payments .panel,
        #view-disputes .panel,
        #view-audit .panel {
          padding: 8px;
        }

        #view-plans table,
        #view-payments table,
        #view-disputes table,
        #view-audit table {
          min-width: 560px;
        }

        #view-plans th,
        #view-payments th,
        #view-disputes th,
        #view-audit th,
        #view-plans td,
        #view-payments td,
        #view-disputes td,
        #view-audit td {
          padding: 9px 10px;
          font-size: 12px;
        }

        .fh-job-widget {
          left: 10px;
          bottom: 10px;
        }

        .fh-job-panel {
          width: min(92vw, 360px);
          max-height: min(62vh, 460px);
        }

        .fh-job-pill-label {
          display: none;
        }

        .fh-chat-widget {
          right: 10px;
          bottom: 10px;
        }

        .fh-chat-widget.fh-chat-widget-open {
          left: 0;
          right: 0;
          bottom: 0;
          top: var(--topbar-height);
          display: block;
        }

        .fh-chat-widget.fh-chat-widget-full {
          left: 0;
          right: 0;
          bottom: 0;
          top: var(--topbar-height);
        }

        body.chat .fh-chat-widget.fh-chat-widget-full {
          top: 0;
        }

        .fh-chat-widget.fh-chat-widget-open .fh-chat-stack {
          display: none !important;
        }

        .fh-chat-panel {
          width: min(96vw, 760px);
          height: min(82vh, 760px);
          max-height: 82vh;
        }

        .fh-chat-widget.fh-chat-widget-open .fh-chat-panel,
        .fh-chat-widget.fh-chat-widget-full .fh-chat-panel {
          width: 100vw;
          height: calc(var(--fh-chat-vh, 100dvh) - var(--topbar-height));
          max-height: calc(var(--fh-chat-vh, 100dvh) - var(--topbar-height));
          border-radius: 0;
          border-left: 0;
          border-right: 0;
          border-bottom: 0;
        }

        body.chat .fh-chat-widget.fh-chat-widget-full .fh-chat-panel {
          height: var(--fh-chat-vh, 100dvh);
          max-height: var(--fh-chat-vh, 100dvh);
        }

        .fh-chat-head {
          padding: 8px 10px;
          gap: 8px;
        }

        .fh-chat-head-meta {
          display: none;
        }

        .fh-chat-close {
          width: 28px;
          height: 28px;
        }

        .fh-chat-head-peer-name {
          max-width: 46vw;
        }

        .fh-chat-body {
          grid-template-columns: 1fr;
          grid-template-rows: 104px minmax(0, 1fr);
        }

        .fh-chat-peers {
          border-right: 0;
          border-bottom: 1px solid #cfdeed;
          display: grid;
          grid-auto-flow: column;
          grid-auto-columns: minmax(148px, 1fr);
          overflow-x: auto;
          overflow-y: hidden;
          -webkit-overflow-scrolling: touch;
        }

        .fh-chat-peer {
          border-bottom: 0;
          border-right: 1px solid rgba(168, 191, 216, 0.38);
          min-height: 76px;
          padding: 8px;
        }

        .fh-chat-thread {
          padding: 8px;
          gap: 6px;
          overscroll-behavior: contain;
          -webkit-overflow-scrolling: touch;
        }

        .fh-chat-msg {
          max-width: 88%;
        }

        .fh-chat-compose {
          padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
          gap: 6px;
          position: sticky;
          bottom: 0;
          z-index: 2;
        }

        .fh-chat-compose textarea {
          min-height: 44px;
          max-height: 96px;
          font-size: 16px;
          line-height: 1.3;
          padding: 7px 8px;
        }

        .fh-chat-compose-row {
          align-items: flex-end;
        }

        .fh-chat-compose-meta {
          font-size: 10px;
        }

        .fh-chat-compose button:not(.fh-chat-attach) {
          padding: 6px 10px;
        }

        .fh-chat-directory {
          display: none !important;
        }
      }
