.rbrmf {
    --rbrm-red: #e62f3b;
    --rbrm-ink: #172026;
    --rbrm-muted: #60707d;
    --rbrm-line: #dce3e8;
    --rbrm-surface: #ffffff;
    --rbrm-soft: #f5f7f9;
    color: var(--rbrm-ink);
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 46px;
    font-family: inherit;
}

.rbrmf * {
    box-sizing: border-box;
}

.rbrmf-hero {
    background: #172026;
    color: #fff;
    border-radius: 8px;
    padding: clamp(22px, 4vw, 40px);
    margin-bottom: 16px;
}

.rbrmf-hero p {
    margin: 0 0 7px;
    color: #ffd7da;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 13px;
}

.rbrmf-hero h1 {
    color: #fff;
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: 0;
}

.rbrmf-hero span {
    display: block;
    max-width: 740px;
    color: #dfe8ed;
    line-height: 1.55;
}

.rbrmf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.rbrmf-tabs a,
.rbrmf-btn,
.rbrmf-heading button,
.rbrmf-upload button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    background: #fff;
    color: var(--rbrm-ink);
    padding: 9px 14px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
}

.rbrmf-tabs a.is-active,
.rbrmf-btn,
.rbrmf-heading button,
.rbrmf-upload button {
    background: var(--rbrm-red);
    border-color: var(--rbrm-red);
    color: #fff;
}

.rbrmf-metrics,
.rbrmf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.rbrmf-metrics article,
.rbrmf-card,
.rbrmf-panel,
.rbrmf-gate {
    background: var(--rbrm-surface);
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20, 31, 38, 0.06);
}

.rbrmf-metrics article {
    padding: 18px;
}

.rbrmf-metrics strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 8px;
}

.rbrmf-metrics span,
.rbrmf-card p,
.rbrmf-panel p,
.rbrmf-gate p {
    color: var(--rbrm-muted);
}

.rbrmf-panel,
.rbrmf-card,
.rbrmf-gate {
    padding: 18px;
    margin-bottom: 16px;
}

.rbrmf-panel h2,
.rbrmf-card h2,
.rbrmf-gate h1 {
    margin: 0 0 10px;
    letter-spacing: 0;
}

.rbrmf-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.rbrmf-heading form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rbrmf input,
.rbrmf select,
.rbrmf textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    padding: 9px 11px;
    background: #fff;
    color: var(--rbrm-ink);
    font: inherit;
}

.rbrmf-heading input {
    min-width: min(290px, 100%);
}

.rbrmf-form-box {
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
    background: var(--rbrm-soft);
    margin-bottom: 14px;
    padding: 0;
}

.rbrmf-form-box summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 800;
}

.rbrmf-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 16px;
}

.rbrmf-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #293943;
}

.rbrmf-wide {
    grid-column: 1 / -1;
}

.rbrmf-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
}

.rbrmf table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.rbrmf th,
.rbrmf td {
    padding: 12px;
    border-bottom: 1px solid var(--rbrm-line);
    text-align: left;
    vertical-align: top;
}

.rbrmf th {
    background: #eef2f5;
    font-size: 13px;
    text-transform: uppercase;
    color: #42515b;
}

.rbrmf td small {
    display: block;
    color: var(--rbrm-muted);
    margin-top: 4px;
}

.rbrmf-performance-panel {
    max-width: none;
}

.rbrmf-live-filters {
    display: grid;
    grid-template-columns: repeat(2, max-content) minmax(180px, 240px) minmax(240px, 1fr);
    gap: 10px;
    align-items: end;
    margin: 12px 0 14px;
}

.rbrmf-live-filters button {
    min-height: 42px;
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    background: #fff;
    color: var(--rbrm-ink);
    padding: 9px 14px;
    font-weight: 800;
    cursor: pointer;
}

.rbrmf-live-filters button.is-active {
    background: var(--rbrm-red);
    border-color: var(--rbrm-red);
    color: #fff;
}

.rbrmf-live-filters button span {
    opacity: 0.8;
}

.rbrmf-live-filters label,
.rbrmf-date-filter {
    display: grid;
    gap: 5px;
    font-weight: 700;
    color: #293943;
}

.rbrmf-live-filters label span,
.rbrmf-date-filter span {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--rbrm-muted);
}

.rbrmf-performance-view {
    display: none;
}

.rbrmf-performance-view.is-active {
    display: block;
}

.rbrmf-performance-table {
    min-width: 1180px;
}

.rbrmf-performance-table th,
.rbrmf-performance-table td {
    white-space: nowrap;
}

.rbrmf-performance-table th:nth-child(1),
.rbrmf-performance-table td:nth-child(1) {
    min-width: 70px;
}

.rbrmf-performance-table th:nth-child(2),
.rbrmf-performance-table td:nth-child(2) {
    min-width: 260px;
}

.rbrmf-performance-table th:nth-child(6),
.rbrmf-performance-table td:nth-child(6) {
    min-width: 300px;
}

.rbrmf-bo-table {
    min-width: 1500px;
}

.rbrmf-bo-table th,
.rbrmf-bo-table td {
    white-space: nowrap;
}

.rbrmf-bo-table th:nth-child(6),
.rbrmf-bo-table td:nth-child(6),
.rbrmf-bo-table th:nth-child(7),
.rbrmf-bo-table td:nth-child(7) {
    min-width: 280px;
}

.rbrmf-pos-summary {
    max-width: 420px;
}

.rbrmf-pos-summary summary,
.rbrmf-mini-form summary {
    cursor: pointer;
    color: var(--rbrm-red);
    font-weight: 800;
}

.rbrmf-pos-summary dl {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    white-space: normal;
}

.rbrmf-pos-summary div {
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    background: var(--rbrm-soft);
    padding: 8px;
}

.rbrmf-pos-summary dt {
    color: var(--rbrm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.rbrmf-pos-summary dd {
    margin: 3px 0 0;
    color: var(--rbrm-ink);
    line-height: 1.45;
}

.rbrmf-muted {
    color: var(--rbrm-muted);
}

.rbrmf-soft-text {
    display: inline-block;
    max-width: 460px;
    white-space: normal;
    color: var(--rbrm-muted);
    line-height: 1.45;
}

.rbrmf-pos-app-table {
    min-width: 1420px;
}

.rbrmf-hermes-table {
    min-width: 1180px;
}

.rbrmf-hermes-result summary,
.rbrmf-hermes-table details summary {
    cursor: pointer;
    font-weight: 800;
}

.rbrmf-hermes-result form {
    display: grid;
    gap: 8px;
    min-width: 260px;
    margin-top: 8px;
}

.rbrmf-hermes-result textarea,
.rbrmf-hermes-result select {
    width: 100%;
}

.rbrmf-briefing-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.rbrmf-briefing-grid article {
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.rbrmf-briefing-grid h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.rbrmf-briefing-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
}

.rbrmf-briefing-list li {
    padding-right: 4px;
}

.rbrmf-briefing-list strong,
.rbrmf-briefing-list span,
.rbrmf-briefing-list small {
    display: block;
}

.rbrmf-briefing-list span {
    margin-top: 3px;
    line-height: 1.45;
}

.rbrmf-briefing-list small {
    color: var(--rbrm-muted);
    margin-top: 4px;
}

.rbrmf-endpoint-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
}

.rbrmf-endpoint-list div {
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.rbrmf-endpoint-list dt {
    color: var(--rbrm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.rbrmf-endpoint-list dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.rbrmf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.rbrmf-pos-app-table th,
.rbrmf-pos-app-table td {
    white-space: nowrap;
}

.rbrmf-pos-app-table th:nth-child(6),
.rbrmf-pos-app-table td:nth-child(6) {
    min-width: 360px;
}

.rbrmf-floating-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    width: min(380px, calc(100vw - 32px));
    font-family: inherit;
    display: grid;
    justify-items: end;
    gap: 10px;
}

.rbrmf-chat-panel {
    display: none;
    width: 100%;
    border: 1px solid rgba(220, 227, 232, 0.92);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(20, 31, 38, 0.24);
    overflow: hidden;
}

.rbrmf-floating-chat.is-open .rbrmf-chat-panel {
    display: block;
}

.rbrmf-chat-panel header {
    background: linear-gradient(135deg, #172026 0%, #24343d 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
}

.rbrmf-chat-panel header strong,
.rbrmf-chat-panel header span {
    display: block;
}

.rbrmf-chat-panel header strong {
    font-size: 16px;
}

.rbrmf-chat-panel header span {
    margin-top: 3px;
    color: #dfe8ed;
    font-size: 13px;
}

.rbrmf-chat-panel header button,
.rbrmf-chat-nudge button {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.rbrmf-chatbox {
    padding: 16px;
}

.rbrmf-chatbox > p {
    margin: 0 0 12px;
    color: var(--rbrm-muted, #60707d);
    line-height: 1.45;
}

.rbrmf-chat-history {
    display: grid;
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
    margin: 0 0 12px;
}

.rbrmf-chat-history article {
    border: 1px solid var(--rbrm-line, #dce3e8);
    border-radius: 6px;
    background: var(--rbrm-soft, #f5f7f9);
    padding: 8px;
}

.rbrmf-chat-history small {
    display: block;
    color: var(--rbrm-muted, #60707d);
    font-size: 12px;
}

.rbrmf-chat-history p {
    margin: 4px 0 0;
}

.rbrmf-chatbox form {
    display: grid;
    gap: 8px;
}

.rbrmf-chatbox input,
.rbrmf-chatbox textarea {
    width: 100%;
    min-height: 88px;
    border: 1px solid var(--rbrm-line, #dce3e8);
    border-radius: 10px;
    padding: 9px 11px;
    font: inherit;
}

.rbrmf-chatbox input {
    min-height: 42px;
}

.rbrmf-chatbox button {
    min-height: 44px;
    border: 1px solid var(--rbrm-red, #e62f3b);
    border-radius: 10px;
    background: var(--rbrm-red, #e62f3b);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.rbrmf-chat-launcher {
    min-height: 58px;
    border: 0;
    border-radius: 999px;
    background: #172026;
    color: #fff;
    box-shadow: 0 16px 42px rgba(20, 31, 38, 0.26);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    position: relative;
}

.rbrmf-chat-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--rbrm-red, #e62f3b);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.rbrmf-chat-dot,
.rbrmf-chat-panel header i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 7px;
    box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.16);
    background: #12b76a;
}

.rbrmf-chat-dot {
    position: absolute;
    left: 42px;
    top: 11px;
    border: 2px solid #172026;
}

.rbrmf-chat-dot.is-away,
.rbrmf-chat-panel header i.is-away {
    background: #f79009;
    box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.16);
}

.rbrmf-chat-nudge {
    display: none;
    width: min(315px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--rbrm-line, #dce3e8);
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(20, 31, 38, 0.18);
    padding: 13px 42px 13px 14px;
    position: relative;
}

.rbrmf-chat-nudge.is-visible {
    display: block;
}

.rbrmf-chat-nudge strong,
.rbrmf-chat-nudge span {
    display: block;
}

.rbrmf-chat-nudge strong {
    color: var(--rbrm-ink, #172026);
    margin-bottom: 3px;
}

.rbrmf-chat-nudge span {
    color: var(--rbrm-muted, #60707d);
    font-size: 13px;
    line-height: 1.35;
}

.rbrmf-chat-nudge button {
    position: absolute;
    right: 9px;
    top: 9px;
    width: 28px;
    height: 28px;
    background: var(--rbrm-soft, #f5f7f9);
    color: var(--rbrm-muted, #60707d);
}

@media (max-width: 520px) {
    .rbrmf-floating-chat {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }

    .rbrmf-chat-panel {
        border-radius: 16px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
    }

    .rbrmf-chat-launcher {
        min-height: 54px;
        padding-right: 15px;
    }
}

.rbrmf-empty-row {
    display: none;
}

.rbrmf-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    background: #ecf7f0;
    color: #166536;
    font-weight: 700;
    font-size: 13px;
}

.rbrmf-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
}

.rbrmf-card dl div {
    background: var(--rbrm-soft);
    border-radius: 6px;
    padding: 10px;
}

.rbrmf-card dt {
    color: var(--rbrm-muted);
    font-size: 13px;
}

.rbrmf-card dd {
    margin: 2px 0 0;
    font-size: 24px;
    font-weight: 800;
}

.rbrmf-upload {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.rbrmf-upload input[type="file"] {
    max-width: 420px;
}

.rbrmf-notice {
    background: #ecf7f0;
    border: 1px solid #b8e3c7;
    color: #166536;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 700;
}

.rbrmf-list {
    margin: 10px 0 0;
    padding-left: 22px;
    color: var(--rbrm-muted);
    line-height: 1.7;
}

.rbrmf-inline-form {
    display: inline-flex;
    margin: 2px 4px 2px 0;
}

.rbrmf-inline-form button {
    min-height: 34px;
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    background: #fff;
    color: var(--rbrm-ink);
    padding: 6px 10px;
    font-weight: 700;
    cursor: pointer;
}

.rbrmf-chat-list {
    display: grid;
    gap: 10px;
}

.rbrmf-chat {
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
    background: var(--rbrm-soft);
    padding: 12px;
}

.rbrmf-chat strong,
.rbrmf-chat time {
    display: block;
}

.rbrmf-chat time {
    color: var(--rbrm-muted);
    font-size: 13px;
    margin-top: 2px;
}

.rbrmf-contact-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.rbrmf-contact-actions a,
.rbrmf-contact-actions summary,
.rbrmf-contact-actions button {
    min-height: 32px;
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    background: #fff;
    color: var(--rbrm-ink);
    padding: 6px 9px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.rbrmf-contact-actions form {
    display: grid;
    gap: 7px;
    min-width: 260px;
    margin-top: 8px;
}

.rbrmf-chat p {
    margin: 8px 0;
}

.rbrmf-row-upgrade td {
    background: #fff5e6;
}

.rbrmf-row-downgrade td {
    background: #fdecec;
}

.rbrmf-row-ok td {
    background: #eef9f1;
}

.rbrmf-mini-form summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--rbrm-red);
}

.rbrmf-mini-form form {
    display: grid;
    gap: 6px;
    min-width: 220px;
    margin-top: 8px;
}

.rbrmf-mini-form textarea,
.rbrmf-mini-form select {
    min-height: 36px;
}

.rbrmf-mini-form button {
    border: 1px solid var(--rbrm-red);
    background: var(--rbrm-red);
    color: #fff;
    border-radius: 6px;
    min-height: 36px;
    font-weight: 800;
}

.rbrmf-message-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
}

.rbrmf-message-card {
    border: 1px solid var(--rbrm-line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.rbrmf-message-card > header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.rbrmf-message-card header strong,
.rbrmf-message-card header span,
.rbrmf-message-card header small {
    display: block;
}

.rbrmf-message-card header span {
    color: var(--rbrm-red);
    font-size: 13px;
    font-weight: 800;
    margin-top: 3px;
}

.rbrmf-message-card header small {
    color: var(--rbrm-muted);
    font-size: 12px;
    text-align: right;
}

.rbrmf-message-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.rbrmf-message-contact div {
    background: var(--rbrm-soft);
    border-radius: 6px;
    padding: 8px;
}

.rbrmf-message-contact dt {
    color: var(--rbrm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.rbrmf-message-contact dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.rbrmf-message-thread {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.rbrmf-message-thread article {
    background: var(--rbrm-soft);
    border-radius: 8px;
    padding: 9px;
}

.rbrmf-message-thread article.is-staff {
    background: #eef9f1;
}

.rbrmf-message-thread small {
    display: block;
    color: var(--rbrm-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.rbrmf-message-thread p {
    margin: 0;
    line-height: 1.45;
}

.rbrmf-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.rbrmf-message-actions form {
    display: inline-flex;
}

.rbrmf-message-actions details form {
    display: grid;
    gap: 8px;
    min-width: 260px;
    margin-top: 8px;
}

.rbrmf-message-actions a,
.rbrmf-message-actions summary,
.rbrmf-message-actions button {
    min-height: 34px;
    border: 1px solid var(--rbrm-line);
    border-radius: 6px;
    background: #fff;
    color: var(--rbrm-ink);
    padding: 7px 10px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.rbrmf-message-actions button {
    font: inherit;
}

.rbrmf-message-actions details button {
    background: var(--rbrm-red);
    border-color: var(--rbrm-red);
    color: #fff;
}

@media (max-width: 760px) {
    .rbrmf {
        padding: 18px 12px 34px;
    }

    .rbrmf-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .rbrmf-heading form,
    .rbrmf-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .rbrmf-form {
        grid-template-columns: 1fr;
    }

    .rbrmf-card dl {
        grid-template-columns: 1fr;
    }

    .rbrmf-live-filters {
        grid-template-columns: 1fr;
    }

    .rbrmf-message-contact {
        grid-template-columns: 1fr;
    }

    .rbrmf-briefing-grid {
        grid-template-columns: 1fr;
    }
}
