/* Shared presentation layer for client record lists. */
body.hg-records-page {
    --hg-record-surface: #fff;
    --hg-record-soft: #f8f7fc;
    --hg-record-border: #e4e6ee;
    --hg-record-text: #17182a;
    --hg-record-muted: #6f7486;
    --hg-record-brand: #7d159b;
    --hg-record-brand-dark: #5c0f76;
    --hg-record-shadow: 0 12px 34px rgba(31, 24, 50, .08);
}

html[data-bs-theme="dark"] body.hg-records-page {
    --hg-record-surface: #181927;
    --hg-record-soft: #1d1e2f;
    --hg-record-border: #2c2e40;
    --hg-record-text: #f5f1fa;
    --hg-record-muted: #adb0bf;
    --hg-record-brand: #c34cde;
    --hg-record-brand-dark: #9f2aba;
    --hg-record-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

body.hg-records-page #main-body {
    padding-bottom: 46px;
    background:
        radial-gradient(circle at 16% 0%, rgba(125, 21, 155, .045), transparent 30rem),
        var(--mo-bg, #f5f6f9);
}

body.hg-records-page #main-body .primary-content {
    min-width: 0;
}

/* Keep the content rail aligned with the client dashboard and the site header. */
@media (min-width: 1200px) {
    body.hg-records-page #main-body > .container > .row {
        display: grid;
        grid-template-columns: 258px minmax(0, 1fr);
        gap: 24px;
        align-items: start;
        margin-right: 0;
        margin-left: 0;
    }

    body.hg-records-page #main-body > .container > .row > .primary-content {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        max-width: none;
        padding: 0;
    }

    body.hg-records-page #main-body > .container > .row > .col-lg-4 {
        position: relative;
        top: auto;
        grid-column: 1;
        grid-row: 1;
        width: auto;
        max-width: none;
        padding: 0;
    }

    body.hg-records-page #main-body > .container > .row > .col-lg-4 > .sidebar {
        display: flex !important;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        margin: 0 !important;
    }
}

/* Tablet layout: filters become a compact row and records regain the full width. */
@media (max-width: 1199.98px) {
    body.hg-records-page #main-body > .container > .row {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-right: 0;
        margin-left: 0;
    }

    body.hg-records-page #main-body > .container > .row > .col-lg-4,
    body.hg-records-page #main-body > .container > .row > .primary-content,
    body.hg-records-page #main-body > .container > .row > .sidebar-secondary {
        width: 100%;
        max-width: none;
        padding: 0;
        flex: 0 0 auto;
    }

    body.hg-records-page #main-body > .container > .row > .col-lg-4 {
        order: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    body.hg-records-page #main-body > .container > .row > .primary-content {
        order: 3;
    }

    body.hg-records-page #main-body > .container > .row > .sidebar-secondary {
        order: 2;
        margin: 0 !important;
    }

    body.hg-records-page #main-body > .container > .row > .col-lg-4 > .sidebar {
        display: contents !important;
    }

    body.hg-records-page #main-body > .container > .row > .sidebar-secondary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

/* Page-scoped sidebar treatment. */
body.hg-records-page #main-body .card-sidebar {
    overflow: hidden;
    width: 100%;
    margin: 0 0 14px !important;
    border: 1px solid var(--hg-record-border) !important;
    border-radius: 18px !important;
    background: var(--hg-record-surface) !important;
    box-shadow: 0 8px 26px rgba(31, 24, 50, .055) !important;
}

body.hg-records-page #main-body .card-sidebar .card-header {
    min-height: 50px;
    padding: 16px 18px 12px !important;
    border: 0 !important;
    background: transparent !important;
}

body.hg-records-page #main-body .card-sidebar .card-title {
    color: var(--hg-record-text) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .075em;
    line-height: 1.35 !important;
    text-transform: uppercase;
}

body.hg-records-page #main-body .card-sidebar .card-minimise {
    color: var(--hg-record-muted);
    font-size: 10px;
}

body.hg-records-page #main-body .card-sidebar .card-body {
    padding: 6px 18px 18px !important;
    color: var(--hg-record-muted);
}

body.hg-records-page #main-body .card-sidebar .list-group {
    padding: 0 10px 10px;
}

body.hg-records-page #main-body .card-sidebar .list-group-item {
    min-height: 42px;
    margin: 2px 0;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--hg-record-text) !important;
    font-size: 13px;
}

body.hg-records-page #main-body .card-sidebar .list-group-item:hover,
body.hg-records-page #main-body .card-sidebar .list-group-item:focus,
body.hg-records-page #main-body .card-sidebar .list-group-item.active,
body.hg-records-page #main-body .card-sidebar .list-group-item.hg-active {
    background: rgba(125, 21, 155, .075) !important;
    color: var(--hg-record-brand) !important;
}

/* Override the legacy inner padding so translated filter labels retain their width. */
body.primary-bg-color.hg-records-page #main-body .card-sidebar .list-group-item .sidebar-menu-item-wrapper {
    padding: 0 !important;
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

body.primary-bg-color.hg-records-page #main-body .card-sidebar .list-group-item .sidebar-menu-item-icon-wrapper {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    flex: 0 0 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(125, 21, 155, .075);
    color: var(--hg-record-brand);
}

body.hg-records-page #main-body .card-sidebar .sidebar-menu-item-icon {
    margin: 0 !important;
    color: inherit !important;
    font-size: 12px;
    line-height: 1;
}

body.hg-records-page #main-body .card-sidebar .sidebar-menu-item-label {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

body.hg-records-page #main-body .card-sidebar .badge {
    min-width: 31px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(125, 21, 155, .11) !important;
    color: var(--hg-record-brand) !important;
    font-size: 10px;
    font-weight: 800;
}

/* WHMCS renders counters as .sidebar-menu-item-badge > .badge. Only the
   outer node is the visual pill; the inner node must not reserve a second box. */
body.hg-records-page #main-body .card-sidebar .sidebar-menu-item-badge > .badge {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    line-height: 1 !important;
}

/* Shared page introduction. */
.hg-records-shell {
    min-width: 0;
}

.hg-records-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 116px;
    margin-bottom: 18px;
    padding: 22px 24px;
    overflow: hidden;
    border: 1px solid var(--hg-record-border);
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% -25%, rgba(164, 52, 193, .17), transparent 15rem),
        linear-gradient(135deg, var(--hg-record-surface) 0%, var(--hg-record-soft) 100%);
    box-shadow: var(--hg-record-shadow);
}

.hg-records-hero::after {
    position: absolute;
    z-index: -1;
    top: -74px;
    right: -38px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(125, 21, 155, .09);
    border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(125, 21, 155, .03);
    content: "";
}

html[dir="rtl"] .hg-records-hero::after {
    right: auto;
    left: -38px;
}

.hg-records-hero__lead {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.hg-records-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--hg-record-brand-dark), #a629c1);
    box-shadow: 0 10px 24px rgba(125, 21, 155, .24);
    color: #fff;
    font-size: 20px;
}

.hg-records-hero__copy {
    min-width: 0;
}

#main-body .hg-records-hero__title {
    margin: 0;
    color: var(--hg-record-text) !important;
    font-size: clamp(21px, 2vw, 27px) !important;
    font-weight: 800 !important;
    letter-spacing: -.025em;
    line-height: 1.18 !important;
}

.hg-records-hero__description {
    max-width: 590px;
    margin: 6px 0 0;
    color: var(--hg-record-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.hg-records-hero__count {
    align-self: start;
    min-width: 31px;
    margin-top: 2px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(125, 21, 155, .1);
    color: var(--hg-record-brand);
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums lining-nums;
    text-align: center;
}

.hg-records-hero__tools {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 1 410px;
}

.hg-records-search {
    position: relative;
    flex: 1 1 250px;
    min-width: 190px;
}

.hg-records-search > i {
    position: absolute;
    top: 50%;
    inset-inline-start: 15px;
    z-index: 1;
    transform: translateY(-50%);
    color: #999eac;
    font-size: 13px;
    pointer-events: none;
}

.hg-records-search input,
body.hg-records-page .dataTables_filter input[type="search"] {
    width: 100%;
    min-height: 43px;
    margin: 0 !important;
    border: 1px solid var(--hg-record-border) !important;
    border-radius: 12px !important;
    background: var(--hg-record-surface) !important;
    color: var(--hg-record-text) !important;
    font-size: 13.5px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.hg-records-search input {
    padding: 9px 14px 9px 40px !important;
}

html[dir="rtl"] .hg-records-search input {
    padding: 9px 40px 9px 14px !important;
}

.hg-records-search input:focus,
body.hg-records-page .dataTables_filter input[type="search"]:focus {
    border-color: var(--hg-record-brand) !important;
    box-shadow: 0 0 0 3px rgba(125, 21, 155, .12) !important;
}

.hg-records-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 43px;
    padding: 10px 16px;
    border: 1px solid var(--hg-record-brand) !important;
    border-radius: 12px;
    background: var(--hg-record-brand) !important;
    box-shadow: 0 8px 18px rgba(125, 21, 155, .2);
    color: #fff !important;
    font-size: 12.5px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s, background .15s;
}

.hg-records-primary:hover,
.hg-records-primary:focus {
    transform: translateY(-1px);
    background: var(--hg-record-brand-dark) !important;
    box-shadow: 0 11px 24px rgba(125, 21, 155, .25);
    color: #fff !important;
}

/* Service and domain record cards. */
body.hg-services-page .hg-sv-list,
body.hg-domains-page .hg-dm-list {
    border-color: var(--hg-record-border);
    border-radius: 18px;
    background: var(--hg-record-surface);
    box-shadow: var(--hg-record-shadow);
}

body.hg-services-page .hg-sv-head,
body.hg-domains-page .hg-dm-head {
    min-height: 48px;
    padding: 12px 18px;
    border-color: var(--hg-record-border);
    background: var(--hg-record-soft);
    color: var(--hg-record-muted);
    font-size: 10px;
    letter-spacing: .065em;
}

body.hg-services-page .hg-sv-row,
body.hg-domains-page .hg-dm-row {
    min-height: 74px;
    border-color: var(--hg-record-border);
    background: var(--hg-record-surface);
}

body.hg-services-page .hg-sv-row:hover,
body.hg-domains-page .hg-dm-row:hover {
    background: var(--hg-record-soft);
}

body.hg-services-page .hg-sv-id strong,
body.hg-services-page .hg-rc--amt,
body.hg-domains-page .hg-dm-id a.dn,
body.hg-domains-page .hg-rc--reg,
body.hg-domains-page .hg-rc--due {
    color: var(--hg-record-text) !important;
}

body.hg-services-page .hg-rc--amt { flex-basis: 140px; }
body.hg-services-page .hg-rc--due { flex-basis: 120px; }
body.hg-services-page .hg-rc--st { flex-basis: 120px; }
body.hg-services-page .hg-rc--act { flex-basis: 132px; }
body.hg-domains-page .hg-rc--reg { flex-basis: 118px; }
body.hg-domains-page .hg-rc--due { flex-basis: 130px; }
body.hg-domains-page .hg-rc--st { flex-basis: 112px; }
body.hg-domains-page .hg-rc--act { flex-basis: 104px; }

body.hg-services-page .hg-sv-go,
body.hg-domains-page .hg-dm-go {
    justify-content: center;
    min-height: 38px;
    border-radius: 10px;
    background: var(--hg-record-brand) !important;
    box-shadow: 0 7px 16px rgba(125, 21, 155, .18);
}

body.hg-domains-page .hg-dm-bulk {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 56px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-color: var(--hg-record-border);
    border-radius: 14px;
    background: var(--hg-record-surface);
    box-shadow: 0 7px 22px rgba(31, 24, 50, .045);
}

body.hg-domains-page .hg-dm-bulk:not(.has-selection) .hg-dm-bbtns {
    display: none !important;
}

body.hg-domains-page .hg-dm-bulk.has-selection {
    border-color: rgba(125, 21, 155, .23);
    background: linear-gradient(135deg, var(--hg-record-surface), rgba(125, 21, 155, .04));
}

body.hg-domains-page .hg-dm-bulk.has-selection .hg-dm-bbtns {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

body.hg-domains-page .hg-dm-selcount {
    min-width: 0;
    color: var(--hg-record-muted);
    font-variant-numeric: tabular-nums;
}

body.hg-domains-page .hg-dm-bulk.has-selection .hg-dm-selcount {
    color: var(--hg-record-brand);
}

body.hg-domains-page .hg-dm-ic > img,
body.hg-domains-page .hg-dm-ic .ssl-state {
    position: absolute !important;
    z-index: 2;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer;
}

body.hg-domains-page .hg-dm-ic:has(.ssl-active)::after {
    position: absolute;
    z-index: 3;
    right: -3px;
    bottom: -3px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--hg-record-surface);
    border-radius: 50%;
    background: #22a95b;
    box-shadow: 0 2px 6px rgba(34, 169, 91, .25);
    content: "";
    pointer-events: none;
}

body.hg-domains-page .hg-dm-action-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(125, 21, 155, .22);
    border-radius: 10px;
    background: rgba(125, 21, 155, .075);
    color: var(--hg-record-brand);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.2;
}

body.hg-domains-page .hg-dm-action-trigger:hover,
body.hg-domains-page .hg-dm-action-trigger:focus,
body.hg-domains-page .show > .hg-dm-action-trigger {
    border-color: var(--hg-record-brand);
    background: var(--hg-record-brand);
    color: #fff;
}

body.hg-domains-page .hg-dm-actions .dropdown-menu {
    min-width: 270px;
    margin-top: 8px;
    padding: 7px;
    border: 1px solid var(--hg-record-border);
    border-radius: 13px;
    background: var(--hg-record-surface);
    box-shadow: 0 18px 42px rgba(31, 24, 50, .16);
}

body.hg-domains-page .hg-dm-actions .hg-dm-baction {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hg-record-text);
    font-size: 12.5px;
    font-weight: 650;
    text-align: start;
}

body.hg-domains-page .hg-dm-actions .hg-dm-baction:hover,
body.hg-domains-page .hg-dm-actions .hg-dm-baction:focus {
    background: rgba(125, 21, 155, .075);
    color: var(--hg-record-brand);
}

body.hg-domains-page .hg-dm-actions .hg-dm-baction > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(125, 21, 155, .08);
    color: var(--hg-record-brand);
    font-size: 11px;
}

body.hg-domains-page .hg-dm-bbtn {
    min-height: 38px;
    border-color: var(--hg-record-border);
    background: var(--hg-record-surface);
    color: var(--hg-record-text);
}

body.hg-domains-page .hg-dm-bbtn:disabled {
    cursor: not-allowed;
    opacity: .46;
    box-shadow: none;
}

/* Ticket and invoice DataTables. */
body.hg-tabular-page .hg-records-table-card {
    min-width: 0;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) {
    overflow: hidden;
    border: 1px solid var(--hg-record-border);
    border-radius: 18px;
    background: var(--hg-record-surface);
    box-shadow: var(--hg-record-shadow);
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .listtable {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
    gap: 12px 18px;
    align-items: center;
    padding: 16px 18px 0;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_info {
    grid-column: 1;
    grid-row: 1;
    padding: 0 !important;
    color: var(--hg-record-muted);
    font-size: 12.5px;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_filter {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    margin: 0 !important;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_filter::before {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    z-index: 1;
    transform: translateY(-50%);
    color: #999eac;
    font-family: "Font Awesome 5 Pro";
    font-size: 12px;
    content: "\f002";
    pointer-events: none;
}

body.hg-tabular-page .dataTables_filter label {
    display: block;
    width: 100%;
    margin: 0;
}

body.hg-tabular-page .dataTables_filter input[type="search"] {
    padding: 9px 14px 9px 39px !important;
}

html[dir="rtl"] body.hg-tabular-page .dataTables_filter input[type="search"] {
    padding: 9px 39px 9px 14px !important;
}

body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) {
    grid-column: 1 / -1;
    width: 100% !important;
    margin: 4px 0 0 !important;
    border: 0 !important;
    color: var(--hg-record-text);
}

body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) thead th {
    padding: 13px 16px !important;
    border-top: 1px solid var(--hg-record-border) !important;
    border-bottom: 1px solid var(--hg-record-border) !important;
    background: var(--hg-record-soft) !important;
    color: var(--hg-record-muted) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .065em;
    line-height: 1.35;
    text-transform: uppercase;
    white-space: nowrap;
}

body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) tbody td {
    padding: 15px 16px !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--hg-record-border) !important;
    background: var(--hg-record-surface) !important;
    color: var(--hg-record-text);
    vertical-align: middle;
}

body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) tbody tr:last-child td {
    border-bottom: 0 !important;
}

body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) tbody tr:hover td {
    background: var(--hg-record-soft) !important;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_length {
    float: left;
    margin: 14px 18px 18px;
    color: var(--hg-record-muted);
    font-size: 12px;
}

html[dir="rtl"] body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_length {
    float: right;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_paginate {
    float: right;
    margin: 14px 18px 18px;
}

html[dir="rtl"] body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_paginate {
    float: left;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_length select {
    min-width: 72px;
    min-height: 38px;
    margin-inline-end: 7px;
    border: 1px solid var(--hg-record-border);
    border-radius: 10px;
    background: var(--hg-record-soft);
    color: var(--hg-record-text);
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .paginate_button {
    min-width: 38px;
    min-height: 38px;
    margin: 0 2px !important;
    padding: 8px 11px !important;
    border: 1px solid var(--hg-record-border) !important;
    border-radius: 10px !important;
    background: var(--hg-record-surface) !important;
    color: var(--hg-record-text) !important;
    box-shadow: none !important;
}

body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .paginate_button.current,
body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .paginate_button:hover {
    border-color: var(--hg-record-brand) !important;
    background: var(--hg-record-brand) !important;
    color: #fff !important;
}

body.hg-tickets-page .hg-col-subject > a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-inline-start: 13px;
    border-inline-start: 2px solid rgba(125, 21, 155, .18);
    color: var(--hg-record-text) !important;
    text-decoration: none;
}

body.hg-tickets-page .ticket-number {
    color: var(--hg-record-muted);
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums lining-nums;
}

body.hg-tickets-page .ticket-subject {
    color: var(--hg-record-text);
    font-size: 13px;
    font-weight: 700;
}

body.hg-tickets-page .hg-tkt-view,
body.hg-invoices-page .hg-invoice-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 37px;
    padding: 8px 12px;
    border: 1px solid rgba(125, 21, 155, .2);
    border-radius: 10px;
    background: rgba(125, 21, 155, .07);
    color: var(--hg-record-brand) !important;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
}

body.hg-tickets-page .hg-tkt-view:hover,
body.hg-invoices-page .hg-invoice-link:hover {
    border-color: var(--hg-record-brand);
    background: var(--hg-record-brand);
    color: #fff !important;
}

body.hg-invoices-page #tableInvoicesList tbody tr {
    cursor: pointer;
}

body.hg-invoices-page .hg-col-total {
    font-weight: 800;
}

body.hg-records-page :is(
    .hg-rc--amt,
    .hg-rc--due,
    .hg-rc--reg,
    .hg-col-updated,
    .hg-col-total,
    .hg-col-date,
    .paginate_button
) {
    font-variant-numeric: tabular-nums lining-nums;
}

body.hg-records-page a:focus-visible,
body.hg-records-page button:focus-visible,
body.hg-records-page input:focus-visible,
body.hg-records-page select:focus-visible {
    outline: 3px solid rgba(125, 21, 155, .28) !important;
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    /* footer.tpl repeats the secondary sidebar for mobile. The full sidebar is
       already promoted above the records here, so suppress the duplicate. */
    body.hg-records-page #main-body > .container > .sidebar-secondary {
        display: none !important;
    }

    .hg-records-hero {
        min-height: 0;
    }

    body.hg-services-page .hg-sv-head,
    body.hg-domains-page .hg-dm-head {
        display: none;
    }

    body.hg-services-page .hg-sv-row,
    body.hg-domains-page .hg-dm-row {
        display: grid !important;
        gap: 13px 18px !important;
        align-items: center;
        margin: 12px;
        padding: 17px !important;
        border: 1px solid var(--hg-record-border) !important;
        border-radius: 14px;
    }

    body.hg-services-page .hg-sv-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.hg-services-page .hg-sv-row > .hg-rc--main {
        grid-column: 1 / -1;
    }

    body.hg-services-page .hg-sv-row > :is(.hg-rc--amt, .hg-rc--due, .hg-rc--st),
    body.hg-domains-page .hg-dm-row > :is(.hg-rc--reg, .hg-rc--due, .hg-rc--st) {
        min-width: 0;
        padding: 0 !important;
        flex-basis: auto;
    }

    body.hg-services-page .hg-sv-row > :is(.hg-rc--amt, .hg-rc--due, .hg-rc--st)::before,
    body.hg-domains-page .hg-dm-row > :is(.hg-rc--reg, .hg-rc--due, .hg-rc--st)::before {
        display: block;
        margin: 0 0 5px;
        color: var(--hg-record-muted);
        font-size: 9.5px;
        font-weight: 800;
        letter-spacing: .055em;
        line-height: 1.3;
        text-transform: uppercase;
        content: attr(data-l);
    }

    body.hg-services-page .hg-sv-row > .hg-rc--act {
        grid-column: 1 / -1;
        padding: 0 !important;
        flex-basis: auto;
        text-align: end;
    }

    body.hg-domains-page .hg-dm-row {
        grid-template-columns: 28px repeat(3, minmax(0, 1fr));
    }

    body.hg-domains-page .hg-dm-row > .hg-rc--chk {
        grid-column: 1;
        grid-row: 1;
    }

    body.hg-domains-page .hg-dm-row > .hg-rc--main {
        grid-column: 2 / -1;
        grid-row: 1;
    }

    body.hg-domains-page .hg-dm-row > .hg-rc--reg { grid-column: 2; }
    body.hg-domains-page .hg-dm-row > .hg-rc--due { grid-column: 3; }
    body.hg-domains-page .hg-dm-row > .hg-rc--st { grid-column: 4; }
    body.hg-domains-page .hg-dm-row > .hg-rc--act {
        grid-column: 2 / -1;
        padding: 0 !important;
        text-align: end;
    }
}

@media (max-width: 768px) {
    body.hg-records-page #main-body > .container > .row > .col-lg-4,
    body.hg-records-page #main-body > .container > .row > .sidebar-secondary {
        grid-template-columns: 1fr;
    }

    body.hg-records-page #main-body .card-sidebar {
        margin-bottom: 0 !important;
        border-radius: 14px !important;
    }

    .hg-records-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        padding: 19px;
        border-radius: 17px;
    }

    .hg-records-hero__lead {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 12px;
    }

    .hg-records-hero__icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
        font-size: 18px;
    }

    #main-body .hg-records-hero__title {
        font-size: 20px !important;
    }

    .hg-records-hero__description {
        font-size: 12.5px;
    }

    .hg-records-hero__tools {
        width: 100%;
        flex: none;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .hg-records-search {
        flex: 1 1 100%;
        min-width: 0;
    }

    .hg-records-primary {
        width: 100%;
    }

    body.hg-domains-page .hg-dm-bulk {
        grid-template-columns: auto minmax(0, 1fr);
    }

    body.hg-domains-page .hg-dm-bulk.has-selection .hg-dm-bbtns {
        display: flex;
        grid-column: 1 / -1;
        justify-content: stretch;
        width: 100%;
        margin: 6px 0 0;
    }

    body.hg-domains-page .hg-dm-actions,
    body.hg-domains-page .hg-dm-action-trigger {
        width: 100%;
    }

    body.hg-domains-page .hg-dm-actions .dropdown-menu {
        width: 100%;
        min-width: 0;
    }

    body.hg-domains-page .hg-dm-bbtn {
        justify-content: flex-start;
        width: 100%;
    }

    body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .listtable {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }

    body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_filter {
        order: 1;
        width: 100%;
    }

    body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_info {
        order: 2;
        width: 100%;
        padding: 0 4px !important;
        text-align: start;
    }

    body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) {
        order: 3;
        display: block !important;
        width: 100% !important;
        margin-top: 2px !important;
    }

    body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) thead {
        display: none !important;
    }

    body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) tbody {
        display: grid !important;
        gap: 12px;
        width: 100% !important;
    }

    body.primary-bg-color.hg-tabular-page #main-body :is(#tableTicketsList, #tableInvoicesList).table-list.dataTable tbody tr {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px 16px;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px;
        border: 1px solid var(--hg-record-border) !important;
        border-radius: 15px;
        background: var(--hg-record-surface) !important;
        box-shadow: 0 8px 24px rgba(31, 24, 50, .055);
    }

    body.primary-bg-color.hg-tabular-page #main-body :is(#tableTicketsList, #tableInvoicesList).table-list.dataTable tbody td,
    body.primary-bg-color.hg-tabular-page #main-body :is(#tableTicketsList, #tableInvoicesList).table-list.dataTable tbody td:last-child,
    body.primary-bg-color.hg-tabular-page #main-body :is(#tableTicketsList, #tableInvoicesList).table-list.dataTable tbody td.hg-col-action {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 5px;
        width: auto !important;
        min-width: 0;
        min-height: 0;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        text-align: start !important;
    }

    body.hg-tabular-page :is(#tableTicketsList, #tableInvoicesList) tbody td::before {
        display: block;
        color: var(--hg-record-muted);
        font-size: 9.5px;
        font-weight: 800;
        letter-spacing: .055em;
        line-height: 1.3;
        text-transform: uppercase;
        content: attr(data-title);
    }

    body.hg-tickets-page #tableTicketsList .hg-col-subject,
    body.hg-tickets-page #tableTicketsList .hg-col-action,
    body.hg-invoices-page #tableInvoicesList .hg-col-invoice {
        grid-column: 1 / -1;
    }

    body.hg-tickets-page #tableTicketsList .hg-col-action {
        align-items: stretch;
    }

    body.hg-tickets-page .hg-tkt-view {
        width: 100%;
    }

    body.hg-invoices-page #tableInvoicesList .hg-col-invoice {
        padding-bottom: 11px !important;
        border-bottom: 1px solid var(--hg-record-border) !important;
    }

    body.hg-invoices-page .hg-invoice-link {
        justify-content: space-between;
        width: 100%;
        min-height: 40px;
    }

    body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_length,
    body.hg-tabular-page :is(#tableTicketsList_wrapper, #tableInvoicesList_wrapper) .dataTables_paginate {
        float: none;
        width: 100%;
        margin: 14px 0 0;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    body.hg-services-page .hg-sv-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.hg-services-page .hg-sv-row > .hg-rc--st { grid-column: 1; }
    body.hg-services-page .hg-sv-row > .hg-rc--act {
        grid-column: 2;
        align-self: end;
    }

    body.hg-services-page .hg-sv-go,
    body.hg-domains-page .hg-dm-go {
        width: 100%;
    }

    body.hg-domains-page .hg-dm-row {
        grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
    }

    body.hg-domains-page .hg-dm-row > .hg-rc--main {
        grid-column: 2 / -1;
    }

    body.hg-domains-page .hg-dm-row > .hg-rc--reg { grid-column: 2; }
    body.hg-domains-page .hg-dm-row > .hg-rc--due { grid-column: 3; }
    body.hg-domains-page .hg-dm-row > .hg-rc--st { grid-column: 2; }
    body.hg-domains-page .hg-dm-row > .hg-rc--act {
        grid-column: 3;
        align-self: end;
    }
}

/* Optional icons and badges must not reserve a text column when absent. */
body.hg-records-page #main-body .card-sidebar .sidebar-menu-item-badge{flex:0 0 auto;margin-inline-start:auto;margin-inline-end:0}
body.hg-records-page #main-body .card-sidebar .recent-ticket{width:100%;min-width:0}
body.hg-records-page #main-body .card-sidebar .recent-ticket small{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 10px;margin-top:6px;font-size:11px;line-height:1.6}
body.hg-records-page #main-body .card-sidebar .recent-ticket small>span{float:none!important}
