/* Shared mobile layout for ERP, portal, service pages and long-form pages. */
.ra-mobile-nav, .ra-mobile-detail, .ra-mobile-sort, .ra-mobile-select-all { display: none; }
.ra-form-help { display: block; margin-top: 5px; color: var(--text3, #66758a); font-size: 11px; line-height: 1.4; }
.ra-form-optional { margin: 14px 0; border: 1px solid var(--border, #d8e0eb); border-radius: 8px; }
.ra-form-optional > summary { min-height: 44px; padding: 11px 12px; cursor: pointer; font-size: 13px; font-weight: 650; }
.ra-form-optional > summary span { color: var(--text3, #66758a); font-weight: 400; font-size: 11px; }
.ra-form-optional > .fgrid { padding: 4px 12px 12px; }
.ra-client-guidance { margin: 0 0 12px; color: var(--text2, #475467); font-size: 12px; line-height: 1.5; }
@media (max-width: 768px) {
  .ra-mobile-ready { --ra-card-divider: color-mix(in srgb, var(--border, #d8e0eb) 56%, transparent); }
  html, body { max-width: 100%; overflow-x: clip; }
  *, *::before, *::after { box-sizing: border-box; }
  :where(main, article, section, .content, .container, .wrap, .ec, .ec-body,
    .modal, .modal-lg, .tw, .toolbar, .grid, .row, .card, .output, .code-wrap) {
    min-width: 0;
    max-width: 100%;
  }
  :where(img, video, iframe, svg, canvas) { max-width: 100%; }
  :where(p, li, td, .fc, .fl, .ec-body, .card, .output) {
    overflow-wrap: anywhere;
  }
  :where(table:not(.ra-mobile-card-table)) {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    table-layout: fixed;
  }
  :where(table:not(.ra-mobile-card-table) th, table:not(.ra-mobile-card-table) td) {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  :where(.table-scroll, .table-wrap, .table-responsive) {
    width: 100%;
    max-width: 100%;
    overflow-x: visible !important;
  }
  :where(input, select, textarea) { min-width: 0; max-width: 100%; }
  :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px !important;
  }
  :where(pre, pre.code, code) {
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: normal;
  }
  :where(.page-actions, .toolbar, .sec-hdr, .ec-hd, .mik-client-tools,
    .mik-log-controls, .filters, .filter-row) {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }
  :where(.page-actions, .toolbar, .filters, .filter-row) > :where(select, input) {
    flex: 1 1 145px;
    width: auto;
    min-width: 0;
  }
  :where(.tw-hint, .home-swipe-hint) { display: none !important; }
  :where(.home-sweep, .home-price-sweep, .home-article-sweep) {
    display: grid !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
  }
  :where(.home-sweep, .home-price-sweep, .home-article-sweep) > * {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
  }
  :where(.ra-mobile-ready) #pipeline-board {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow-x: visible !important;
  }
  :where(.ra-mobile-ready) .copy-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  :where(.ra-mobile-ready) .copy-bar > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  :where(.ra-mobile-ready) #ev-diagnostik [style*="grid-template-columns:1fr auto auto"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  :where(.ra-mobile-ready) .mik-vpn-view-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .ra-mobile-ready .mik-panel-card .ec-hd { flex-wrap: wrap; }
  .ra-mobile-ready :is(.mik-client-tools, .mik-session-tools) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .ra-mobile-ready :is(.mik-client-tools, .mik-session-tools) > :is(input, select) {
    grid-column: 1 / -1;
    flex: 1 1 140px;
    width: auto !important;
    min-width: 0;
    min-height: 44px;
  }
  .ra-mobile-ready .mik-client-tools > button {
    flex: 1 1 85px;
    min-width: 0;
    min-height: 44px;
    white-space: normal;
  }
  :where(.ra-mobile-ready) :is(.ra-mobile-nav, .ra-mobile-sort) {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0 0 8px;
    padding: 8px 12px;
    color: var(--text, #172033);
    background: #fff;
    border: 1px solid var(--border, #d8e0eb);
    border-radius: 8px;
    font-size: 16px;
  }
  :where(.ra-mobile-ready) .ra-mobile-tab-list { display: none !important; }
  .ra-mobile-nav[hidden], .ra-mobile-select-all[hidden] { display: none !important; }
  .ra-mobile-ready .ra-mobile-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 4px 6px;
    font-size: 13px;
  }
  .ra-mobile-select-all input { width: 18px; height: 18px; }
  :where(.ra-mobile-ready) .tw {
    width: 100%;
    max-width: 100%;
    overflow-x: visible !important;
  }
  :where(.ra-mobile-ready) .ra-mobile-sort {
    margin: 5px 0 7px;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table,
  :where(.ra-mobile-ready) table.ra-mobile-card-table > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto;
  }
  /* Reset desktop/legacy table borders before rows become mobile cards.
     Without this, collapsed table borders can survive as dark segmented boxes
     on Safari/Chromium mobile after display:block conversion. */
  :where(.ra-mobile-ready) table.ra-mobile-card-table {
    border: 0 !important;
    outline: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table > :is(thead, tbody, tfoot),
  :where(.ra-mobile-ready) table.ra-mobile-card-table > :is(thead, tbody, tfoot) > tr {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table > thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table > tbody {
    padding: 6px;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row {
    display: block !important;
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0 0 8px;
    padding: 4px 10px;
    background: var(--card, #fff);
    border: 1px solid var(--border, #d8e0eb) !important;
    outline: 0 !important;
    border-radius: 9px;
    box-shadow: none;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > :is(td, th) {
    display: block !important;
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 9px 0 9px 32% !important;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--ra-card-divider, var(--border, #e7ecf4));
    background: transparent !important;
    box-shadow: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: left !important;
    vertical-align: top;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > :is(td, th)::before {
    content: attr(data-ra-mobile-label);
    position: absolute;
    top: 10px;
    left: 0;
    width: 29%;
    color: var(--text3, #66758a);
    font: 600 10px/1.4 var(--font, system-ui);
    text-align: left;
    text-transform: uppercase;
    overflow-wrap: anywhere;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > :first-child {
    color: var(--text, #172033);
    font-weight: 650;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > :last-child {
    border-bottom: 0;
  }
  /* Comparison rows are reference content, not operational records. Keep every
     option visible and stack the header above its value so long plan names
     never compete for the same narrow column. */
  .ra-mobile-ready table[data-mobile-table="comparison"].ra-mobile-card-table > tbody {
    padding: 0;
  }
  .ra-mobile-ready table[data-mobile-table="comparison"].ra-mobile-card-table .ra-mobile-card-row {
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 12px;
  }
  .ra-mobile-ready table[data-mobile-table="comparison"].ra-mobile-card-table .ra-mobile-card-row > :is(td, th) {
    padding: 11px 0 !important;
    font-size: 14px;
    line-height: 1.55;
  }
  .ra-mobile-ready table[data-mobile-table="comparison"].ra-mobile-card-table .ra-mobile-card-row > :is(td, th)::before {
    position: static;
    display: block;
    width: auto;
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.4;
  }
  .ra-mobile-ready table[data-mobile-table="comparison"].ra-mobile-card-table .ra-mobile-card-row > :first-child {
    padding-top: 2px !important;
    font-size: 17px;
    line-height: 1.35;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-span,
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-empty-row > :first-child {
    padding-left: 0 !important;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-span::before,
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-empty-row > :first-child::before {
    display: none;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table
    .ra-mobile-card-row:not(.ra-mobile-expanded) > .ra-mobile-secondary {
    display: none !important;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-filtered,
  :where(.ra-mobile-ready) table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-filtered,
  :where(.ra-mobile-ready) table.ra-mobile-card-table [hidden] { display: none !important; }
  .ra-mobile-detail {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 6px 10px;
    color: var(--text2, #475467);
    background: var(--surface-2, #f9fafc);
    border: 1px solid var(--border, #d8e0eb);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    font-family: inherit;
    cursor: pointer;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table :where(button, select, input, a) {
    max-width: 100%;
  }
  :where(.ra-mobile-ready) table.ra-mobile-card-table :where(button, select) {
    min-height: 44px;
  }
  /* Card identity, actions and disclosure each have their own space. */
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-card-row > :first-child {
    position: relative !important;
    padding-left: 0 !important;
    font-size: 13px;
  }
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-has-detail > .ra-mobile-detail-anchor {
    position: relative !important;
    min-height: 72px;
    padding-left: 0 !important;
    padding-right: 128px !important;
  }
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-card-row > :first-child::before,
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-detail-anchor::before,
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-actions-cell::before {
    position: static;
    display: block;
    width: auto;
    margin-bottom: 6px;
  }
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-actions-cell {
    padding: 8px 0 !important;
  }
  /* Action areas are controls, not data separators. A single card outline is
     enough; per-cell top/bottom borders created the dark segmented lines seen
     across Client/Invoice/Kas/Log on mobile. */
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-actions-cell {
    border-top: 0 !important;
    border-bottom: 0 !important;
  }
  .ra-mobile-ready .ra-mobile-detail {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    min-width: 112px;
    justify-content: center;
    gap: 8px;
  }
  .ra-mobile-detail::after { content: '⌄'; }
  .ra-mobile-detail[aria-expanded="true"]::after { content: '⌃'; }
  /* Client, Invoice, and monthly totals: scan the essentials before opening details. */
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row {
    padding: 9px 12px;
    margin-bottom: 8px;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > :is(td, th) {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    border-bottom: 0;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-has-detail > .ra-mobile-detail-anchor {
    min-height: 44px;
    padding-right: 104px !important;
    display: flex !important;
    align-items: center;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > .ra-mobile-detail-anchor::before {
    content: none !important;
    display: none !important;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-detail {
    min-width: 88px;
    min-height: 44px;
    padding: 6px 8px;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > :nth-child(2),
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > :nth-child(3) {
    padding-left: 0 !important;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > :nth-child(2)::before,
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > :nth-child(3)::before {
    position: static;
    display: inline;
    width: auto;
    margin-right: 6px;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > .ra-mobile-secondary {
    padding-left: 32% !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    border-top: 1px solid var(--ra-card-divider, var(--border, #e7ecf4));
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > .ra-mobile-secondary::before {
    display: block;
    position: absolute;
    width: 29%;
    top: 9px;
    left: 0;
    margin: 0;
  }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > .ra-mobile-actions-cell::before { display: none; }
  .ra-mobile-ready table.ra-mobile-dense .ra-mobile-card-row > .ra-mobile-actions-cell { padding: 5px 0 0 !important; }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
  }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :is(td, th) { grid-column: 1 / -1; }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(8) { grid-column: 1; }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(9) { grid-column: 2; }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(2)::before,
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(3)::before { display: none; }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(2) {
    font-size: 13px !important;
    font-weight: 600 !important;
  }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(8)::before { display: none; }
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(8),
  .ra-mobile-ready table:has(> tbody#cl-main-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(9) {
    min-width: 0 !important;
    padding-top: 8px !important;
    border-top: 0 !important;
  }
  .ra-mobile-ready #cl-main-tbl .ra-mobile-duplicate-pic { display: none !important; }
  .ra-mobile-ready #cl-main-tbl .vpn-aksi-wrap { display: flex !important; width: 100%; min-width: 0; gap: 2px !important; }
  .ra-mobile-ready #cl-main-tbl .vpn-aksi-wrap > button {
    width: 100%; min-width: 0; max-width: 100%; justify-content: center;
    gap: 2px !important; padding: 8px 4px !important;
    font-size: 11px !important; white-space: nowrap !important; overflow-wrap: normal !important;
  }
  .ra-mobile-ready #cl-main-tbl .vpn-aksi-wrap > button > span:first-child { display: none; }
  .ra-mobile-ready #cl-main-tbl .vpn-aksi-wrap > button > span { white-space: nowrap !important; }
  .ra-mobile-ready #cl-main-tbl .aksi-wrap,
  .ra-mobile-ready #cl-main-tbl .aksi-btn { display: flex; width: 100%; min-width: 0; justify-content: center; }
  .ra-mobile-ready #cl-main-tbl .aksi-btn { white-space: nowrap !important; }
  .ra-mobile-ready #cl-main-tbl .ra-mobile-card-row > :nth-child(3) .badge { font-size: 12px; letter-spacing: normal; }
  .ra-mobile-ready table:has(> tbody#lap-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(7) {
    padding-left: 0 !important;
    border-top: 1px solid var(--ra-card-divider, var(--border, #e7ecf4));
  }
  .ra-mobile-ready table:has(> tbody#lap-tbl).ra-mobile-dense .ra-mobile-card-row > :nth-child(7)::before {
    position: static;
    display: inline;
    margin-right: 6px;
  }
  .ra-mobile-ready table:has(> tbody#lap-tbl).ra-mobile-dense .ra-mobile-quiet-month { opacity: .72 !important; }
  .ra-mobile-ready table:has(> tbody#lap-tbl).ra-mobile-dense .ra-mobile-quiet-month:not(.ra-mobile-expanded) > :nth-child(7) {
    display: none !important;
  }
  .ra-mobile-ready table.ra-mobile-card-table :is(.eb, .mik-inline-btn) {
    height: auto;
    min-height: 44px;
    padding: 9px 12px !important;
    border-radius: 7px;
    font: 600 12px/1.35 var(--font, system-ui) !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .ra-mobile-ready .mik-inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
    gap: 8px;
  }
  .ra-mobile-ready .mik-inline-actions > .mik-inline-btn {
    width: 100%;
    min-width: 0;
    gap: 6px;
    justify-content: flex-start;
    box-shadow: none;
  }
  .ra-mobile-ready .mik-inline-btn span { display: inline; min-width: 0; }
  .ra-mobile-ready table.ra-mobile-card-table .ra-mobile-card-row > .ra-mobile-actions-cell:has(> .ra-mobile-actions-menu)::before {
    display: none;
  }
  .ra-mobile-ready .ra-mobile-actions-menu > summary,
  .ra-mobile-ready .ra-mobile-client-more > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 9px 12px;
    border: 1px solid var(--border, #d8e0eb);
    border-radius: 7px;
    background: var(--surface-2, #f9fafc);
    color: var(--text, #172033);
    font: 600 12px/1.35 var(--font, system-ui);
    cursor: pointer;
  }
  .ra-mobile-ready :is(.ra-mobile-actions-menu, .ra-mobile-client-more) > summary::-webkit-details-marker { display: none; }
  .ra-mobile-ready :is(.ra-mobile-actions-menu, .ra-mobile-client-more) > summary::after { content: '⌄'; }
  .ra-mobile-ready :is(.ra-mobile-actions-menu, .ra-mobile-client-more)[open] > summary::after { content: '⌃'; }
  .ra-mobile-ready :is(.ra-mobile-actions-menu, .ra-mobile-client-more) > summary:focus-visible,
  .ra-mobile-ready .ra-mobile-detail:focus-visible { outline: 2px solid var(--sky, #2563eb); outline-offset: 2px; }
  .ra-mobile-ready .ra-mobile-actions-menu > .mik-inline-actions { margin-top: 8px; }
  .ra-mobile-ready .ra-mobile-actions-menu .mik-inline-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ra-mobile-ready .mik-inline-btn.is-success { color: var(--text-success, #15803d); }
  .ra-mobile-ready .mik-inline-btn.is-warning { color: var(--text-warning, #b45309); }
  .ra-mobile-ready .mik-inline-btn.is-danger { color: var(--text-danger, #b91c1c); }
  .ra-mobile-ready table.ra-mobile-card-table input[type="checkbox"] {
    width: 20px; height: 20px; margin: 10px 0;
  }
  .ra-mobile-ready .mik-workspace-nav { display: block; padding: 10px; }
  .ra-mobile-ready .mik-tab-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .ra-mobile-ready .mik-tab-actions > .eb {
    min-height: 44px;
    width: 100%;
    margin: 0;
    padding: 9px 10px;
    white-space: normal;
    font-size: 12px;
  }
  .ra-mobile-ready .mik-tab-actions > .eb:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ra-mobile-ready .mik-tab-actions:has(> :nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ra-mobile-ready .mik-tab-actions:has(> :nth-child(3)) > .eb:last-child { grid-column: auto; }
  .ra-mobile-ready :is(.sec-hdr > div:last-child:not(:first-child), .page-actions-primary):has(> .eb) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px !important;
  }
  .ra-mobile-ready :is(.sec-hdr > div:last-child:not(:first-child), .page-actions-primary):has(> .eb) > :is(.eb, .erp-more-actions) {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
  }
  .ra-mobile-ready :is(.sec-hdr > div:last-child:not(:first-child), .page-actions-primary) > .eb,
  .ra-mobile-ready .ec-hd > .eb {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 12px;
    white-space: normal;
    justify-content: center;
  }
  .ra-mobile-ready :is(.sec-hdr > div:last-child:not(:first-child), .page-actions-primary):has(> .eb) > .eb:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .ra-mobile-ready #ev-clients > .sec-hdr > div:last-child:has(> .ra-mobile-client-more) {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px !important;
  }
  .ra-mobile-ready #ev-clients > .sec-hdr > div:last-child > :is(.eb-primary, .ra-mobile-client-more) {
    grid-column: auto !important;
    min-width: 0;
    width: 100%;
  }
  .ra-mobile-ready #ev-clients > .sec-hdr > div:last-child > .eb-primary,
  .ra-mobile-ready .ra-mobile-client-more > summary {
    min-height: 60px;
    justify-content: center;
    text-align: center;
  }
  .ra-mobile-ready .ra-mobile-client-more > summary { gap: 4px; }
  .ra-mobile-ready .ra-mobile-client-more-items {
    position: absolute;
    right: 0;
    z-index: 25;
    width: min(280px, calc(100vw - 32px));
    max-height: min(60dvh, 440px);
    overflow-y: auto;
    padding: 8px;
    background: var(--card, #fff);
    border: 1px solid var(--border, #d8e0eb);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16,24,40,.16);
  }
  .ra-mobile-ready .ra-mobile-client-more-items > .eb {
    display: flex;
    width: 100%;
    min-height: 44px;
    margin: 0 0 6px;
    justify-content: flex-start;
    white-space: normal;
  }
  .ra-mobile-ready :is(.mik-client-tools, .mik-session-tools) > select { max-width: none !important; }
  .ra-mobile-ready .rcfg-header { flex-wrap: wrap; gap: 8px !important; }
  .ra-mobile-ready .rcfg-header > div { min-width: 0; }
  .ra-mobile-ready .rcfg-header > div:last-child { flex: 1 1 100%; justify-content: space-between; }
  .ra-mobile-ready .rcfg-header span { overflow-wrap: anywhere; }
  .ra-mobile-ready #script-cards .article-card { flex-wrap: wrap; opacity: 1 !important; background: var(--card) !important; }
  .ra-mobile-ready #script-cards .article-card > div:first-of-type { white-space: normal !important; overflow: visible !important; }
  .ra-mobile-ready #script-cards .article-card > div:last-child { gap: 8px !important; }
  .ra-mobile-ready #script-cards .article-card .eb { min-width: 44px; min-height: 44px; }
  :where(.ra-mobile-ready) .modal,
  :where(.ra-mobile-ready) .modal-lg {
    width: min(100%, calc(100dvw - 16px)) !important;
    max-width: calc(100dvw - 16px) !important;
    max-height: calc(100dvh - env(safe-area-inset-bottom, 0px) - 16px) !important;
    overflow-x: hidden;
    overflow-y: auto;
  }
  :where(.ra-mobile-ready) :where(.fgrid, .f3, .f4) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (max-width: 480px) {
  nav.topnav {
    height: auto;
    min-height: 58px;
    padding-block: 8px;
    flex-wrap: wrap;
    gap: 6px;
  }
  nav.topnav > * { min-width: 0; }
  :where(.ra-mobile-ready) :where(.content, .ec-body, .mbody) {
    padding-inline: 10px;
  }
  :where(.ra-mobile-ready) .sg {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  :where(.ra-mobile-ready) .ra-mobile-card-row {
    font-size: 12px;
  }
}
