/* ==================================================================
 * HostRomeo — Modern Billing UI
 * Scoped styles for: invoices list, mass payment, add funds.
 * All components are prefixed `hr-` so they never collide with the
 * Emyui / Elementor / WHMCS Six styles loaded before this file.
 * Loaded from includes/head.tpl after css/custom.css.
 * ================================================================== */

:root {
    --hr-pink: #FF2E93;
    --hr-purple: #8A3FFC;
    --hr-blue: #0EA5E9;
    --hr-gradient: linear-gradient(135deg, #FF2E93 0%, #8A3FFC 52%, #0EA5E9 100%);
    --hr-ink: #0e1019;
    --hr-ink-2: #171a29;
    --hr-text: #0f172a;
    --hr-body: #334155;
    --hr-muted: #64748b;
    --hr-faint: #94a3b8;
    --hr-line: #e6eaf2;
    --hr-line-soft: #f0f3f8;
    --hr-canvas: #f7f9fc;
    --hr-card: #ffffff;
    --hr-radius: 16px;
    --hr-radius-sm: 10px;
    --hr-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -8px rgba(15, 23, 42, .08);
    --hr-shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 24px 48px -16px rgba(15, 23, 42, .16);
    --hr-focus: 0 0 0 3px rgba(138, 63, 252, .28);
}

/* ---------- Base wrapper ---------- */
.hr-billing,
.hr-billing * { box-sizing: border-box; }
.hr-billing {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    color: var(--hr-body);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 32px;
}
.hr-billing h1, .hr-billing h2, .hr-billing h3, .hr-billing h4 {
    color: var(--hr-text);
    letter-spacing: -.01em;
    margin: 0;
}
.hr-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.hr-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hr-muted);
}

/* ---------- Cards ---------- */
.hr-card {
    background: var(--hr-card);
    border: 1px solid var(--hr-line);
    border-radius: var(--hr-radius);
    box-shadow: var(--hr-shadow);
}
.hr-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--hr-line-soft);
}
.hr-card__title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--hr-text) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hr-card__title i { color: var(--hr-purple); }
.hr-card__body { padding: 22px; }
.hr-card__foot {
    padding: 14px 22px;
    border-top: 1px solid var(--hr-line-soft);
    background: #fbfcfe;
    border-radius: 0 0 var(--hr-radius) var(--hr-radius);
    font-size: 12.5px;
    color: var(--hr-muted);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.hr-card__foot i { margin-top: 3px; color: var(--hr-faint); }

/* ---------- Buttons (own class, avoids theme .btn rules) ---------- */
.hr-btn,
a.hr-btn,
button.hr-btn,
input.hr-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px !important;
    border-radius: 999px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: .005em;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    width: auto !important;
    min-width: 0 !important;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.hr-btn:focus-visible { outline: none; box-shadow: var(--hr-focus) !important; }
.hr-btn.hr-btn--primary {
    background: var(--hr-gradient) !important;
    background-size: 160% 100% !important;
    color: #fff !important;
    box-shadow: 0 6px 18px -6px rgba(138, 63, 252, .55) !important;
}
.hr-btn.hr-btn--primary:hover,
.hr-btn.hr-btn--primary:focus {
    color: #fff !important;
    background-position: 100% 0 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -8px rgba(138, 63, 252, .65) !important;
}
.hr-btn.hr-btn--ghost {
    background: #fff !important;
    color: var(--hr-text) !important;
    border-color: var(--hr-line) !important;
}
.hr-btn.hr-btn--ghost:hover,
.hr-btn.hr-btn--ghost:focus {
    color: var(--hr-purple) !important;
    border-color: rgba(138, 63, 252, .45) !important;
    background: rgba(138, 63, 252, .04) !important;
}
.hr-btn.hr-btn--light {
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, .18) !important;
}
.hr-btn.hr-btn--light:hover { background: rgba(255, 255, 255, .18) !important; color: #fff !important; }
.hr-btn.hr-btn--sm { height: 34px; padding: 0 14px !important; font-size: 13px !important; }
.hr-btn.hr-btn--lg { height: 52px; padding: 0 26px !important; font-size: 15px !important; }
.hr-btn.hr-btn--block { display: flex !important; width: 100% !important; }

/* ---------- Status pills ---------- */
.hr-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
}
.hr-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}
.hr-pill--paid,
.hr-pill--paymentpending,
.hr-pill--payment-pending { background: #ecfdf3; color: #067647; border-color: #c7f0d8; }
.hr-pill--unpaid,
.hr-pill--draft { background: #fff7e6; color: #b54708; border-color: #fde3b0; }
.hr-pill--overdue,
.hr-pill--collections { background: #fff1f3; color: #c01048; border-color: #ffd0d9; }
.hr-pill--refunded { background: #eff8ff; color: #175cd3; border-color: #cfe5ff; }
.hr-pill--cancelled { background: #f2f4f7; color: #475467; border-color: #e4e7ec; }
.hr-pill--unpaid::before,
.hr-pill--overdue::before { animation: hr-pulse 2s ease-in-out infinite; }
@keyframes hr-pulse {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    50% { box-shadow: 0 0 0 4px transparent; opacity: .55; }
}

/* ---------- Summary strip (invoice list) ---------- */
.hr-summary {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.hr-stat {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 118px;
}
.hr-stat__value {
    font-size: 30px;
    font-weight: 800;
    color: var(--hr-text);
    line-height: 1.1;
    letter-spacing: -.02em;
}
.hr-stat__sub { font-size: 12.5px; color: var(--hr-muted); }
.hr-stat__icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    margin-bottom: 4px;
}
.hr-stat__icon--green { background: #ecfdf3; color: #067647; }
.hr-stat__icon--purple { background: #f3edff; color: var(--hr-purple); }

.hr-stat--hero {
    position: relative;
    overflow: hidden;
    background: var(--hr-ink) !important;
    border-color: var(--hr-ink) !important;
    color: rgba(255, 255, 255, .72);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.hr-stat--hero::before {
    content: "";
    position: absolute;
    inset: auto -30% -120% auto;
    width: 320px; height: 320px;
    background: radial-gradient(closest-side, rgba(255, 46, 147, .45), rgba(138, 63, 252, .25) 55%, transparent 75%);
    pointer-events: none;
}
.hr-stat--hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--hr-gradient);
}
.hr-stat--hero > * { position: relative; }
.hr-stat--hero .hr-eyebrow { color: rgba(255, 255, 255, .6); }
.hr-stat--hero .hr-stat__value { color: #fff; }
.hr-stat--hero .hr-stat__sub { color: rgba(255, 255, 255, .65); }
.hr-stat--hero.is-clear::before {
    background: radial-gradient(closest-side, rgba(14, 165, 233, .35), rgba(138, 63, 252, .2) 55%, transparent 75%);
}
.hr-stat__heart { color: var(--hr-pink); }

/* ---------- Invoice list table ---------- */
.hr-table-card { overflow: hidden; }
.hr-table-card .table-container { margin: 0 !important; overflow: visible !important; }
.hr-table-card .dataTables_wrapper { padding: 0; }

/* Toolbar: DataTables search + info */
.hr-table-card .dataTables_wrapper .listtable { position: relative; }
.hr-table-card .dataTables_filter {
    float: none !important;
    text-align: left !important;
    padding: 16px 22px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--hr-line-soft);
}
.hr-table-card .dataTables_filter label {
    display: block !important;
    margin: 0 !important;
    width: 100%;
    position: relative;
    font-weight: 400 !important;
}
.hr-table-card .dataTables_filter label::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--hr-faint);
    font-size: 13px;
    pointer-events: none;
}
.hr-table-card .dataTables_filter input {
    width: 100% !important;
    max-width: 340px;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 14px 0 38px !important;
    border-radius: 999px !important;
    border: 1px solid var(--hr-line) !important;
    background: var(--hr-canvas) !important;
    box-shadow: none !important;
    font-size: 13.5px !important;
    color: var(--hr-text) !important;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.hr-table-card .dataTables_filter input:focus {
    outline: none;
    background: #fff !important;
    border-color: rgba(138, 63, 252, .5) !important;
    box-shadow: var(--hr-focus) !important;
}
.hr-table-card .dataTables_info {
    position: absolute;
    right: 22px;
    top: 28px;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    width: auto !important;
    font-size: 12.5px !important;
    color: var(--hr-muted) !important;
}

.hr-table-card table.table-list,
.hr-table-card table.dataTable {
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse !important;
    background: #fff !important;
}
.hr-table-card table.table-list thead th {
    background: #fbfcfe !important;
    border: 0 !important;
    border-bottom: 1px solid var(--hr-line) !important;
    padding: 12px 22px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--hr-muted) !important;
    white-space: nowrap !important;
}
.hr-table-card table.table-list thead th.sorting::after,
.hr-table-card table.table-list thead th.sorting_asc::after,
.hr-table-card table.table-list thead th.sorting_desc::after { opacity: .45; }
.hr-table-card table.table-list tbody td {
    padding: 16px 22px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--hr-line-soft) !important;
    vertical-align: middle !important;
    background: transparent !important;
    color: var(--hr-body);
    font-size: 14px;
}
.hr-table-card table.table-list tbody tr { cursor: pointer; transition: background-color .15s; }
.hr-table-card table.table-list tbody tr:hover td { background: #faf8ff !important; }
.hr-table-card table.table-list tbody tr:last-child td { border-bottom: 0 !important; }
.hr-table-card .text-right, .hr-table-card th.hr-col-amount, .hr-table-card td.hr-col-amount { text-align: right !important; }
.hr-table-card th.hr-col-action, .hr-table-card td.hr-col-action { text-align: right !important; width: 1%; }

.hr-inv-id { display: flex; align-items: center; gap: 12px; }
.hr-inv-id__icon {
    width: 36px; height: 36px; flex: none;
    border-radius: 10px;
    background: #f3edff;
    color: var(--hr-purple);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.hr-inv-id__num { font-weight: 700; color: var(--hr-text); }
.hr-inv-id__num a { color: inherit !important; font-weight: 700 !important; text-decoration: none !important; }
.hr-inv-id__num a:hover { color: var(--hr-purple) !important; }
.hr-inv-id__meta { font-size: 12px; color: var(--hr-muted); display: block; margin-top: 1px; }
.hr-amount { font-weight: 700; color: var(--hr-text); white-space: nowrap; }
.hr-date-overdue { color: #c01048; font-weight: 600; }

/* Footer row: length menu left, pagination right */
.hr-table-card .dataTables_wrapper { display: flex; flex-wrap: wrap; align-items: center; }
.hr-table-card .dataTables_wrapper > .listtable { flex: 0 0 100%; width: 100%; border-bottom: 1px solid var(--hr-line-soft); }
.hr-table-card .dataTables_wrapper > .dataTables_length { order: 2; }
.hr-table-card .dataTables_wrapper > .dataTables_paginate { order: 3; margin-left: auto !important; }

/* Sort indicators: Font Awesome instead of Glyphicons */
.hr-table-card table.dataTable thead .sorting::after,
.hr-table-card table.dataTable thead .sorting_asc::after,
.hr-table-card table.dataTable thead .sorting_desc::after {
    font-family: "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900;
    font-size: 10px;
    content: "\f0dc" !important;
    position: static !important;
    display: inline-block;
    margin-left: 6px;
    opacity: .35;
}
.hr-table-card table.dataTable thead .sorting_asc::after { content: "\f0de" !important; opacity: .8; color: var(--hr-purple); }
.hr-table-card table.dataTable thead .sorting_desc::after { content: "\f0dd" !important; opacity: .8; color: var(--hr-purple); }

/* Pagination + length menu */
.hr-table-card .dataTables_paginate,
.hr-table-card .dataTables_length {
    padding: 14px 22px !important;
    margin: 0 !important;
}
.hr-table-card .dataTables_paginate { float: none !important; width: auto !important; }
.hr-table-card .dataTables_length { float: none !important; width: auto !important; color: var(--hr-muted); font-size: 12.5px; display: flex !important; align-items: center; }
.hr-table-card .dataTables_length label { display: flex; align-items: center; gap: 8px; margin: 0 !important; font-weight: 500 !important; }
.hr-table-card .dataTables_wrapper .dataTables_length label select.form-control,
.hr-table-card .dataTables_length select {
    height: 34px !important; width: auto !important; min-width: 66px !important; padding: 0 28px 0 12px !important; line-height: 32px !important;
    border-radius: 8px !important; border: 1px solid var(--hr-line) !important; font-size: 13px !important;
    -webkit-appearance: none; appearance: none; background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 10px center !important;
}
.hr-table-card .dataTables_length .nice-select { display: none !important; }
.hr-table-card .dataTables_length select { display: inline-block !important; }
.hr-table-card .pagination { margin: 0 !important; display: flex; }
.hr-table-card .pagination > .disabled > a,
.hr-table-card .pagination > .disabled > span { opacity: .45; background: #fff !important; }
.hr-table-card .pagination > li > a,
.hr-table-card .pagination > li > span {
    border-radius: 8px !important;
    margin: 0 2px !important;
    border: 1px solid var(--hr-line) !important;
    color: var(--hr-body) !important;
    min-width: 34px;
    text-align: center;
}
.hr-table-card .pagination > .active > a,
.hr-table-card .pagination > .active > span {
    background: var(--hr-ink) !important;
    border-color: var(--hr-ink) !important;
    color: #fff !important;
}

.hr-loading {
    padding: 48px 22px;
    text-align: center;
    color: var(--hr-muted);
}

/* Empty state */
.hr-empty {
    text-align: center;
    padding: 56px 24px;
}
.hr-empty__icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: #f3edff;
    color: var(--hr-purple);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
}
.hr-empty h3 { font-size: 18px !important; margin-bottom: 6px !important; }
.hr-empty p { color: var(--hr-muted); margin: 0 auto; max-width: 380px; }

/* Sidebar invoice filters (WHMCS .view-filter-btns) on billing pages */
.page-clientareainvoices .view-filter-btns .list-group-item {
    border: 0 !important;
    border-radius: 10px !important;
    margin: 2px 8px !important;
    padding: 10px 14px !important;
    font-weight: 600;
    color: var(--hr-body) !important;
}
.page-clientareainvoices .view-filter-btns .list-group-item.active,
.page-clientareainvoices .view-filter-btns .list-group-item.active:hover {
    background: #f3edff !important;
    color: var(--hr-purple) !important;
}
.page-clientareainvoices .view-filter-btns .list-group-item .badge {
    background: var(--hr-line-soft) !important;
    color: var(--hr-body) !important;
    border-radius: 999px !important;
    font-weight: 700;
}

/* ---------- Mass payment ---------- */
.hr-pay-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}
.hr-inv-block + .hr-inv-block { border-top: 1px solid var(--hr-line-soft); }
.hr-inv-block__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 16px 22px 8px;
}
.hr-inv-block__head .hr-inv-id__num { font-size: 14.5px; }
.hr-lines { list-style: none; margin: 0; padding: 0 22px 14px; }
.hr-lines li {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 8px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--hr-line);
}
.hr-lines li:last-child { border-bottom: 0; }
.hr-lines li span:first-child { color: var(--hr-body); }
.hr-lines li span:last-child { font-weight: 600; color: var(--hr-text); white-space: nowrap; }

.hr-totals { list-style: none; margin: 0; padding: 0; }
.hr-totals li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 7px 0;
    font-size: 13.5px;
    color: var(--hr-muted);
}
.hr-totals li span:last-child { color: var(--hr-text); font-weight: 600; }
.hr-totals li.hr-totals__grand {
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--hr-line);
    font-size: 15px;
    color: var(--hr-text);
    font-weight: 700;
}
.hr-totals li.hr-totals__grand span:last-child {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.hr-sticky { position: sticky; top: 90px; }

/* ---------- Forms ---------- */
.hr-field { margin-bottom: 18px; }
.hr-field > label,
.hr-label {
    display: block;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--hr-text) !important;
    margin: 0 0 8px !important;
}
.hr-input,
.hr-select,
.hr-billing select.form-control,
.hr-billing input.form-control {
    display: block;
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    border: 1px solid var(--hr-line) !important;
    background-color: #fff !important;
    color: var(--hr-text) !important;
    font-family: inherit !important;
    font-size: 15px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
    transition: border-color .15s, box-shadow .15s;
}
.hr-select,
.hr-billing select.form-control {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}
.hr-input:focus,
.hr-select:focus,
.hr-billing .form-control:focus {
    outline: none;
    border-color: rgba(138, 63, 252, .55) !important;
    box-shadow: var(--hr-focus) !important;
}
/* Hide theme "nice-select" replacement on our selects */
.hr-billing .nice-select { display: none !important; }
.hr-billing select.hr-select { display: block !important; }

.hr-money {
    position: relative;
}
.hr-money .hr-input {
    height: 64px !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -.01em;
    padding-left: 18px !important;
}
.hr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hr-chip {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--hr-line);
    background: #fff;
    color: var(--hr-body);
    font: 600 13px/1 inherit;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
}
.hr-chip:hover, .hr-chip.is-active {
    border-color: rgba(138, 63, 252, .5);
    color: var(--hr-purple);
    background: #f8f4ff;
}
.hr-chip:focus-visible { outline: none; box-shadow: var(--hr-focus); }

/* Limits list (add funds) */
.hr-limits {
    border: 1px solid var(--hr-line-soft);
    background: #fbfcfe;
    border-radius: 12px;
    padding: 4px 16px;
    margin-bottom: 22px;
}
.hr-limits > div {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 0;
}
.hr-limits > div + div { border-top: 1px dashed var(--hr-line); }
.hr-limits strong { color: var(--hr-text); font-size: 14px; font-weight: 700; white-space: nowrap; }

.hr-split {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.hr-perks { list-style: none; margin: 0; padding: 0; }
.hr-perks li { display: flex; gap: 12px; padding: 10px 0; color: var(--hr-body); font-size: 13.5px; }
.hr-perks li i {
    flex: none;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: #f3edff;
    color: var(--hr-purple);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.hr-perks li strong { display: block; color: var(--hr-text); font-weight: 700; }

.hr-secure {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--hr-muted);
}
.hr-secure i { color: #067647; }

.hr-billing .alert { border-radius: 12px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hr-pay-grid, .hr-split { grid-template-columns: 1fr; }
    .hr-sticky { position: static; }
}
@media (max-width: 767px) {
    .hr-summary { grid-template-columns: 1fr 1fr; }
    .hr-stat--hero { grid-column: 1 / -1; flex-direction: column; align-items: flex-start; }
    .hr-stat__value { font-size: 26px; }
    .hr-table-card .dataTables_info { position: static; padding: 0 22px 12px !important; }
    .hr-table-card .dataTables_filter input { max-width: none; }
    .hr-table-card table.table-list tbody td,
    .hr-table-card table.table-list thead th { padding-left: 14px !important; padding-right: 14px !important; }
    .hr-table-card .dataTables_wrapper > .dataTables_paginate { margin: 0 auto !important; }
    .hr-table-card .dataTables_wrapper > .dataTables_length { display: none !important; }
}
@media (max-width: 480px) {
    .hr-stat:not(.hr-stat--hero) { min-height: 0; padding: 16px; }
    .hr-stat__value { font-size: 24px; }
    .hr-inv-id__icon { display: none; }
}
@media (max-width: 340px) {
    .hr-summary { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .hr-billing *, .hr-billing *::before { animation: none !important; transition: none !important; }
}

/* Pages without a sidebar: let the content use the full container width
   (custom.css forces .main-content to 75% on desktop for every page). */
@media (min-width: 992px) {
    #main-body .main-content:not(.col-md-9) {
        width: 100% !important;
        float: none !important;
    }
}

/* ==================================================================
 * Mobile menu fix: on touch devices Bootstrap 3 inserts an invisible
 * full-screen ".dropdown-backdrop" when a dropdown opens. On phones the
 * client menu's dropdown items are laid out statically and ended up
 * underneath it, so every tap hit the backdrop and just closed the menu
 * (Store / Account items couldn't be selected). Lift them above it.
 * ================================================================== */
.client-nav > li.dropdown > .dropdown-toggle { position: relative; z-index: 1001; }
.client-nav > li.dropdown > .dropdown-menu { z-index: 1002; }
@media (max-width: 767px) {
    .client-nav > li.dropdown > .dropdown-menu { position: relative !important; }
}

/* Footer: keep the logo inside its column (it overlapped the link columns on phones) */
.footer-section .brand-logo img,
.footer-section .brand-logo .dark-version-logo { display: block; max-width: 100%; width: 220px; height: auto; }
@media (max-width: 991px) {
    .footer-section .hr-footer-brand .brand-logo { margin-bottom: 18px !important; }
    .footer-section .hr-footer-brand p { max-width: 520px; }
}
