/* Sungame v1.3.7 brand, service, commerce, and motion layer.  All selectors are theme-scoped. */
:root {
    --sg-brand-dark: #0f4633;
    --sg-brand-contrast: #ffffff;
    --sg-sun-soft: #fce2bb;
    --sg-grid-line: rgba(20, 32, 28, .045);
}

/* v1.4.4 shared utility surface contract.  The utility body scope keeps
 * legacy WHMCS presentation from leaking into mature pages while preserving
 * the dynamic sidebar renderer and every native page data contract. */
body.sg-utility-page .sg-main {
    padding-top: 36px;
}

body.sg-utility-page .sg-layout--with-sidebar {
    gap: 28px;
}

body.sg-utility-page .sg-sidebar-stack {
    display: grid;
    gap: 14px;
}

body.sg-utility-page .sg-sidebar--secondary {
    margin-top: 0;
}

body.sg-utility-page .sg-sidebar .card-sidebar,
body.sg-utility-page .sg-sidebar .card {
    margin-bottom: 0;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    background: var(--sg-surface);
    box-shadow: var(--sg-shadow-sm);
}

body.sg-utility-page .sg-sidebar .card-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--sg-border);
    background: var(--sg-surface-muted);
}

body.sg-utility-page .sg-sidebar .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--sg-text);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

body.sg-utility-page .sg-sidebar .card-title > i:first-child {
    flex: 0 0 14px;
    width: 14px;
    color: var(--sg-accent-solid);
    font-size: 12px;
    text-align: center;
}

body.sg-utility-page .sg-sidebar .card-title .badge {
    min-width: 20px;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--sg-surface-emphasis);
    color: var(--sg-text-secondary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

body.sg-utility-page .sg-sidebar .card-title .card-minimise {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--sg-text-muted);
    float: none;
    font-size: 10px;
}

body.sg-utility-page .sg-sidebar .card-title .badge + .card-minimise {
    margin-left: 4px;
}

body.sg-utility-page .sg-sidebar .card-body {
    padding: 12px 14px;
}

body.sg-utility-page .sg-sidebar .card-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--sg-border);
    background: var(--sg-surface-muted);
}

body.sg-utility-page .sg-sidebar .list-group {
    border-top: 1px solid var(--sg-border);
}

body.sg-utility-page .sg-sidebar .list-group-item {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 12px;
    border-color: var(--sg-border);
    background: transparent;
    color: var(--sg-text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

body.sg-utility-page .sg-sidebar .list-group-item > i {
    flex: 0 0 14px;
    width: 14px;
    margin-right: 7px;
    color: var(--sg-text-muted);
    font-size: 11px;
    text-align: center;
}

body.sg-utility-page .sg-sidebar .list-group-item .badge {
    order: 2;
    min-width: 20px;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--sg-surface-emphasis);
    color: var(--sg-text-secondary);
    font-size: 11px;
    line-height: 1.3;
}

body.sg-utility-page .sg-sidebar .list-group-item:hover,
body.sg-utility-page .sg-sidebar .list-group-item:focus-visible {
    background: var(--sg-surface-muted);
    color: var(--sg-text);
}

body.sg-utility-page .sg-sidebar .list-group-item.active {
    border-color: var(--sg-border);
    background: var(--sg-accent-soft);
    color: var(--sg-accent-solid);
    font-weight: 700;
}

body.sg-utility-page .sg-sidebar .list-group-item.active > i {
    color: var(--sg-accent-solid);
}

body.sg-utility-page .sg-sidebar .list-group-item.disabled {
    opacity: .55;
}

body.sg-utility-page .sg-page-intro.sg-utility-page-intro {
    margin-bottom: 24px;
}

body.sg-utility-page .sg-page-intro.sg-utility-page-intro h1 {
    max-width: 760px;
    margin-bottom: 7px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

body.sg-utility-page .sg-content .card {
    margin-bottom: 18px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    background: var(--sg-surface);
    box-shadow: var(--sg-shadow-sm);
}

body.sg-utility-page .sg-content .card-body {
    padding: 22px;
}

body.sg-utility-page .sg-content .card-body.extra-padding {
    padding: 28px;
}

body.sg-utility-page .sg-content .card-header {
    padding: 13px 18px;
    border-bottom: 1px solid var(--sg-border);
    background: var(--sg-surface-muted);
    color: var(--sg-text);
    font-size: 13px;
    font-weight: 700;
}

body.sg-utility-page .sg-content .card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--sg-border);
    background: var(--sg-surface-muted);
    color: var(--sg-text-muted);
}

body.sg-utility-page .sg-content .card-title {
    color: var(--sg-text);
    font-size: var(--sg-type-section);
    font-weight: 750;
    line-height: 1.3;
}

body.sg-utility-page .sg-content .card-title > i {
    color: var(--sg-accent-solid);
    font-size: .78em;
}

body.sg-page-announcements .sg-content > .card:first-child .card-title {
    display: none;
}

body.sg-utility-page .sg-content > .card > .card-body > h1,
body.sg-utility-page .sg-content .announcement h1 {
    margin-bottom: 10px;
    color: var(--sg-text);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

body.sg-page-announcements .announcement + .announcement {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--sg-border);
}

body.sg-page-announcements .announcement article,
body.sg-page-viewannouncement .sg-content .py-5,
body.sg-page-knowledgebasearticle .sg-content article {
    color: var(--sg-text-secondary);
    line-height: 1.8;
}

body.sg-page-viewannouncement .sg-content .card-body > .py-5 {
    padding-top: 20px;
    padding-bottom: 20px;
}

body.sg-utility-page .sg-content .list-inline {
    color: var(--sg-text-muted);
    font-size: var(--sg-type-meta);
}

body.sg-utility-page .sg-content .kb-search {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    background: var(--sg-surface);
    box-shadow: var(--sg-shadow-sm);
}

body.sg-utility-page .sg-content .kb-search .form-control {
    min-height: 42px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.sg-utility-page .sg-content .kb-search .input-group-append {
    margin-left: 0;
}

body.sg-utility-page .sg-content .kb-search .btn {
    min-height: 42px;
    border-radius: var(--sg-radius-sm);
}

body.sg-utility-page .sg-content .list-group {
    border-top: 1px solid var(--sg-border);
}

body.sg-utility-page .sg-content .list-group-item {
    border-color: var(--sg-border);
    background: var(--sg-surface);
    color: var(--sg-text-secondary);
    line-height: 1.5;
}

body.sg-utility-page .sg-content .list-group-item:hover,
body.sg-utility-page .sg-content .list-group-item:focus-visible {
    background: var(--sg-surface-muted);
    color: var(--sg-text);
}

body.sg-utility-page .sg-content .kb-category {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

body.sg-utility-page .sg-content .kb-category:hover,
body.sg-utility-page .sg-content .kb-category:focus-within {
    transform: translateY(-2px);
    border-color: var(--sg-border-strong);
    box-shadow: var(--sg-shadow-md);
}

body.sg-utility-page .sg-content .alert {
    margin-bottom: 18px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    box-shadow: none;
}

body.sg-utility-page .sg-content .alert-info {
    border-color: var(--sg-border);
    background: var(--sg-surface-muted);
    color: var(--sg-text-secondary);
}

body.sg-utility-page .sg-content .alert-success {
    border-color: #cce3d2;
    background: #eef7f0;
    color: var(--sg-success);
}

body.sg-utility-page .sg-content .alert-warning {
    border-color: #ead8af;
    background: #fbf6e9;
    color: var(--sg-warning);
}

body.sg-utility-page .sg-content .alert-danger {
    border-color: #e8c8c8;
    background: #fbefef;
    color: var(--sg-danger);
}

body.sg-utility-page .sg-content .alert-link {
    color: var(--sg-accent-solid);
    font-weight: 700;
}

body.sg-utility-page .sg-content .form-group {
    margin-bottom: 20px;
}

body.sg-utility-page .sg-content label {
    color: var(--sg-text-secondary);
    font-size: var(--sg-type-label);
    font-weight: 700;
}

body.sg-utility-page .sg-content .form-control,
body.sg-utility-page .sg-content .custom-select {
    min-height: 42px;
    border: 1px solid var(--sg-border-strong);
    border-radius: var(--sg-radius-sm);
    background: var(--sg-surface);
    color: var(--sg-text);
    box-shadow: none;
}

body.sg-utility-page .sg-content .form-control:focus,
body.sg-utility-page .sg-content .custom-select:focus {
    border-color: var(--sg-accent);
    box-shadow: 0 0 0 3px rgba(46, 139, 99, .12);
}

body.sg-utility-page .sg-content textarea.markdown-editor {
    min-height: 220px;
    resize: vertical;
}

body.sg-utility-page .sg-content .custom-file-label {
    min-height: 42px;
    overflow: hidden;
    border-color: var(--sg-border-strong);
    border-radius: var(--sg-radius-sm);
    background: var(--sg-surface);
    color: var(--sg-text-secondary);
    line-height: 26px;
}

body.sg-utility-page .sg-content .custom-file-label::after {
    height: 40px;
    border-left-color: var(--sg-border);
    background: var(--sg-surface-muted);
    color: var(--sg-text-secondary);
}

body.sg-utility-page .sg-content .btn-primary {
    border-color: var(--sg-accent-solid);
    background: var(--sg-accent-solid);
    color: var(--sg-text-on-accent);
}

body.sg-utility-page .sg-content .btn-primary:hover,
body.sg-utility-page .sg-content .btn-primary:focus-visible {
    border-color: var(--sg-accent-solid-hover);
    background: var(--sg-accent-solid-hover);
    color: var(--sg-text-on-accent);
}

body.sg-utility-page .sg-content .btn-default,
body.sg-utility-page .sg-content .btn-secondary {
    border-color: var(--sg-border-strong);
    background: var(--sg-surface);
    color: var(--sg-text-secondary);
}

body.sg-utility-page .sg-content .btn-default:hover,
body.sg-utility-page .sg-content .btn-default:focus-visible,
body.sg-utility-page .sg-content .btn-secondary:hover,
body.sg-utility-page .sg-content .btn-secondary:focus-visible {
    border-color: var(--sg-accent);
    background: var(--sg-accent-soft);
    color: var(--sg-accent-solid);
}

body.sg-utility-page .sg-content .table {
    margin-bottom: 0;
    color: var(--sg-text-secondary);
    background: var(--sg-surface);
}

body.sg-utility-page .sg-content .table thead th {
    border-top: 0;
    background: var(--sg-surface-muted);
    color: var(--sg-text);
    font-size: var(--sg-type-meta);
    font-weight: 750;
}

body.sg-utility-page .sg-content .table td,
body.sg-utility-page .sg-content .table th {
    border-color: var(--sg-border);
    vertical-align: middle;
}

body.sg-utility-page .sg-content .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(238, 243, 241, .52);
}

body.sg-utility-page .sg-content .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0 0;
}

body.sg-utility-page .sg-content .pagination .page-item {
    margin: 0;
}

body.sg-utility-page .sg-content .pagination .page-link {
    min-width: 34px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--sg-border);
    border-radius: 9px;
    background: var(--sg-surface);
    color: var(--sg-text-secondary);
    line-height: 1.2;
    text-align: center;
}

body.sg-utility-page .sg-content .pagination .page-item.active .page-link {
    border-color: var(--sg-accent-solid);
    background: var(--sg-accent-solid);
    color: var(--sg-text-on-accent);
}

body.sg-utility-page .sg-content .pagination .page-link:hover,
body.sg-utility-page .sg-content .pagination .page-link:focus-visible {
    border-color: var(--sg-accent);
    background: var(--sg-surface-muted);
    color: var(--sg-accent-solid);
}

body.sg-utility-page .sg-content .pagination .page-item.disabled .page-link {
    opacity: .48;
    pointer-events: none;
}

@media (max-width: 700px) {
    body.sg-utility-page .sg-main {
        padding-top: 28px;
    }

    body.sg-utility-page .sg-layout--with-sidebar {
        gap: 18px;
    }

    body.sg-utility-page .sg-sidebar-stack {
        gap: 12px;
    }

    body.sg-utility-page .sg-content .card-body {
        padding: 18px;
    }

    body.sg-utility-page .sg-content .card-body.extra-padding {
        padding: 22px 18px;
    }

    body.sg-utility-page .sg-content .kb-search .form-control {
        min-width: 0;
    }

    body.sg-utility-page .sg-content .kb-search .btn {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.sg-utility-page .sg-content .pagination {
        row-gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.sg-utility-page .sg-content .kb-category {
        transition: none;
    }

    body.sg-utility-page .sg-content .kb-category:hover,
    body.sg-utility-page .sg-content .kb-category:focus-within {
        transform: none;
    }
}

.sg-body {
    background-color: var(--sg-bg);
    background-image:
        linear-gradient(90deg, var(--sg-grid-line) 1px, transparent 1px),
        linear-gradient(var(--sg-grid-line) 1px, transparent 1px);
    background-position: center top;
    background-size: 48px 48px;
}

.sg-body::selection {
    background: var(--sg-brand-soft);
    color: var(--sg-ink);
}

.sg-body h1,
.sg-body h2,
.sg-body h3,
.sg-body h4,
.sg-body h5,
.sg-body h6,
.sg-body button,
.sg-body .btn,
.sg-body .sg-button {
    font-family: var(--sg-font-sans);
}

.sg-body .sg-eyebrow,
.sg-body .sg-service-meta__label,
.sg-body .sg-service-facts dt,
.sg-body .sg-service-detail-grid dt {
    font-size: var(--sg-type-meta);
}

.sg-body .sg-button,
.sg-body .btn {
    font-size: var(--sg-type-button);
}

.sg-body .sg-home-hero h1 {
    font-size: var(--sg-type-hero);
}

.sg-body .sg-page-intro h1,
.sg-body .sg-section-heading h2 {
    font-size: var(--sg-type-page);
}

.sg-body .sg-service-hero h1 {
    font-size: var(--sg-type-service);
}

.sg-body .sg-service-tool-section h2 {
    font-size: var(--sg-type-section);
}

.sg-header {
    background: rgba(255, 255, 255, .97);
}

.sg-brand__image {
    display: block;
    width: 174px;
    height: auto;
    max-height: none;
}

.sg-brand:focus-visible,
.sg-account-link:focus-visible,
.sg-button:focus-visible,
.sg-icon-button:focus-visible,
.sg-menu-toggle:focus-visible,
.sg-nav__link:focus-visible,
.sg-service-actions__toggle:focus-visible,
.sg-footer a:focus-visible {
    outline: 3px solid rgba(239, 127, 26, .55);
    outline-offset: 3px;
}

.sg-button,
.sg-body .btn-primary,
.sg-body .btn-primary-faded {
    border-radius: 8px;
    font-weight: 700;
}

.sg-body .sg-button,
.sg-body .btn {
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.sg-button--accent,
.sg-body .btn-primary {
    background: var(--sg-brand);
    border-color: var(--sg-brand);
    color: var(--sg-brand-contrast);
}

.sg-button--accent:hover,
.sg-button--accent:focus,
.sg-body .btn-primary:hover,
.sg-body .btn-primary:focus {
    background: var(--sg-brand-hover);
    border-color: var(--sg-brand-hover);
    color: var(--sg-brand-contrast);
}

.sg-cta-arrow {
    display: inline-block;
    margin-left: .35rem;
    font-size: 1.1em;
    line-height: 1;
    transition: transform 160ms ease;
}

a:hover .sg-cta-arrow,
button:hover .sg-cta-arrow,
a:focus .sg-cta-arrow,
button:focus .sg-cta-arrow {
    transform: translateX(3px);
}

.sg-footer {
    position: relative;
    overflow: visible;
    background: var(--sg-surface);
}

.sg-footer__watermark-lockup {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-width: min(760px, 100%);
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    flex-wrap: nowrap;
}

.sg-footer__watermark-mark {
    position: relative;
    z-index: 1;
    display: block;
    flex: 0 0 auto;
    width: clamp(60px, 9vw, 100px);
    max-width: 100%;
    height: auto;
    filter: grayscale(1) saturate(0);
    opacity: .18;
    pointer-events: none;
    user-select: none;
}

.sg-footer__watermark-wordmark {
    position: relative;
    z-index: 1;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    height: auto;
    filter: grayscale(1) saturate(0);
    opacity: .10;
    pointer-events: none;
    user-select: none;
}

.sg-footer__watermark-zone {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 116px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    overflow: visible;
    padding: 16px 0 18px;
    border-top: 1px solid var(--sg-border);
    border-bottom: 1px solid var(--sg-border);
}

.sg-footer__watermark-caption {
    position: relative;
    z-index: 2;
    flex: 0 1 180px;
    min-width: 0;
    max-width: 180px;
    padding-bottom: 4px;
    color: var(--sg-text-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .12em;
    overflow-wrap: anywhere;
    text-align: right;
    text-transform: uppercase;
}

.sg-footer__inner {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 0;
    padding-top: 38px;
    padding-bottom: 22px;
}

.sg-footer__brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.sg-footer__mark {
    flex: 0 0 auto;
    width: 178px;
    height: auto;
}

.sg-footer__brand-block p {
    max-width: 260px;
    margin: 0;
    color: var(--sg-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.sg-footer__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px 28px;
    padding-bottom: 26px;
}

.sg-footer__column {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
}

.sg-footer__column h2 {
    margin: 0 0 7px;
    color: var(--sg-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.sg-footer__column a {
    color: var(--sg-text-secondary);
    font-size: 13px;
}

.sg-footer__column a:hover,
.sg-footer__column a:focus {
    color: var(--sg-brand);
}

.sg-footer__column .sg-social-links,
.sg-footer__column .social-icons {
    display: flex;
    gap: 8px;
    margin-top: 3px;
}

.sg-footer__column .sg-social-links {
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.sg-footer__column .sg-social-links .list-inline-item {
    margin-right: 0;
    margin-left: 0;
}

.sg-footer__meta {
    justify-content: space-between;
    padding-top: 20px;
}

.sg-nav__badge {
    min-height: 16px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 16px;
}

/* Homepage recovery: present the existing product groups as equal, quiet
 * solution cards. No price, hardware, inventory or feature claims are added. */
.sg-home-hero {
    padding-bottom: 54px;
}

.sg-home-section {
    padding-top: 68px;
}

.sg-section-heading--center {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.sg-home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.sg-home-product {
    min-height: 318px;
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    border-color: var(--sg-border);
    border-radius: var(--sg-radius-lg);
    background: var(--sg-surface);
    box-shadow: none;
    color: var(--sg-text);
}

.sg-home-product:hover,
.sg-home-product:focus-within {
    border-color: var(--sg-brand);
    box-shadow: var(--sg-shadow-sm);
    color: var(--sg-text);
    transform: translateY(-3px);
}

.sg-home-product__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sg-home-product__index {
    color: var(--sg-sun);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .1em;
}

.sg-home-product__tag {
    padding: 5px 9px;
    border: 1px solid var(--sg-border);
    border-radius: 999px;
    color: var(--sg-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.sg-home-product__body {
    width: 100%;
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
}

.sg-home-product__body h3 {
    margin: 0;
    color: var(--sg-ink);
    font-size: clamp(19px, 1.8vw, 24px);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.sg-home-product__body p {
    max-width: 28rem;
    margin: 0;
    color: var(--sg-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.sg-home-product__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--sg-border);
}

.sg-home-product__meta {
    max-width: 10rem;
    color: var(--sg-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.sg-home-product__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--sg-border-strong);
    border-radius: 8px;
    background: var(--sg-surface);
    color: var(--sg-brand);
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.sg-home-product__cta:hover,
.sg-home-product__cta:focus {
    border-color: var(--sg-brand);
    background: var(--sg-brand);
    color: var(--sg-brand-contrast);
}

.sg-home-product__cta i {
    font-size: 11px;
    transition: transform 160ms ease;
}

.sg-home-product__cta:hover i,
.sg-home-product__cta:focus i {
    transform: translateX(3px);
}

.sg-signal-mark {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 104px;
    height: 104px;
    opacity: .88;
    transform: translate(-50%, -50%);
}

.sg-signal-mark img {
    display: block;
    width: 100%;
    height: 100%;
}

.sg-signal-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 268px;
    height: 178px;
    border: 1px solid rgba(239, 127, 26, .28);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
}

.sg-signal-orbit__node {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--sg-surface);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(20, 91, 66, .09);
}

.sg-signal-orbit__node--sun {
    top: 20px;
    right: 35px;
    background: var(--sg-sun);
}

.sg-signal-orbit__node--server {
    right: 17px;
    bottom: 30px;
    background: var(--sg-brand);
}

.sg-signal-orbit__node--world {
    bottom: 13px;
    left: 47px;
    background: var(--sg-accent);
}

.sg-signal-card__meta {
    color: var(--sg-text-muted);
    font-size: 10px;
    line-height: 1.4;
}

/* Service detail */
.sg-service-detail {
    min-width: 0;
}

.sg-service-detail__breadcrumb {
    margin-bottom: 18px;
    color: var(--sg-text-muted);
    font-size: 12px;
}

.sg-service-detail__breadcrumb a {
    color: var(--sg-text-secondary);
}

.sg-service-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid var(--sg-border);
    border-radius: 18px;
    background: var(--sg-surface-raised);
    box-shadow: var(--sg-shadow-sm);
}

.sg-service-hero::after {
    position: absolute;
    right: 28px;
    top: 24px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sg-sun);
    box-shadow: 0 0 0 8px var(--sg-sun-soft);
    content: "";
}

.sg-service-hero__eyebrow,
.sg-service-detail .sg-eyebrow {
    margin: 0 0 9px;
    color: var(--sg-brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sg-service-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--sg-ink);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 820;
    letter-spacing: -.05em;
    line-height: 1.08;
}

.sg-service-hero__subtitle {
    margin: 11px 0 0;
    color: var(--sg-text-secondary);
    font-size: 15px;
}

.sg-service-hero__state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.sg-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 4px 11px;
    border: 1px solid var(--sg-border-strong);
    border-radius: 999px;
    background: var(--sg-surface-muted);
    color: var(--sg-text-secondary);
    font-size: 12px;
    font-weight: 750;
}

.sg-status-pill__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.sg-status-pill--active,
.sg-service-detail .status-active,
.sg-service-detail .status-active .sg-status-pill__dot {
    color: var(--sg-success);
}

.sg-status-pill--active {
    border-color: rgba(31, 112, 77, .25);
    background: #edf8f1;
}

.sg-service-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, .7fr);
    gap: 16px;
    margin-top: 18px;
}

.sg-service-meta__address,
.sg-service-meta__actions {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--sg-border);
    border-radius: 12px;
    background: var(--sg-surface);
}

.sg-service-meta__label,
.sg-service-facts dt {
    display: block;
    margin-bottom: 6px;
    color: var(--sg-text-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .03em;
}

.sg-address {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.sg-address__value {
    min-width: 0;
    overflow: hidden;
    color: var(--sg-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-copy-button {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid var(--sg-border-strong);
    border-radius: 6px;
    background: var(--sg-surface);
    color: var(--sg-brand);
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
}

.sg-copy-button:hover,
.sg-copy-button:focus {
    border-color: var(--sg-brand);
    background: var(--sg-brand-soft);
}

.sg-service-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.sg-service-actions .btn {
    min-height: 40px;
}

.sg-service-actions__dropdown {
    position: relative;
    flex: 0 0 auto;
}

.sg-service-actions__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.sg-service-actions__toggle i {
    font-size: 10px;
}

.sg-service-actions__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    min-width: 198px;
    max-width: min(280px, calc(100vw - 32px));
    padding: 6px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    background: var(--sg-surface);
    box-shadow: var(--sg-shadow-md);
}

.sg-service-actions__dropdown.is-open .sg-service-actions__menu {
    display: block;
}

.sg-service-actions__menu[hidden] {
    display: none;
}

.sg-service-actions__menu a {
    display: block;
    padding: 10px 11px;
    border-radius: var(--sg-radius-sm);
    color: var(--sg-text-secondary);
    font-size: 13px;
    font-weight: 650;
    white-space: normal;
}

.sg-service-actions__menu a:hover,
.sg-service-actions__menu a:focus {
    background: var(--sg-surface-muted);
    color: var(--sg-text);
}

.sg-service-facts {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--sg-border);
    border-radius: 14px;
    background: var(--sg-border);
}

.sg-service-fact {
    min-width: 0;
    grid-column: span 2;
    padding: 18px 20px;
    background: var(--sg-surface);
}

/* Keep every supported fact count on a complete, intentional row. */
.sg-service-fact:first-child:last-child,
.sg-service-fact:nth-child(4):last-child,
.sg-service-fact:nth-child(7):last-child {
    grid-column: 1 / -1;
}

.sg-service-fact:first-child:nth-last-child(2),
.sg-service-fact:nth-child(2):last-child,
.sg-service-fact:nth-child(4):nth-last-child(2),
.sg-service-fact:nth-child(5):last-child,
.sg-service-fact:nth-child(7):nth-last-child(2),
.sg-service-fact:nth-child(8):last-child {
    grid-column: span 3;
}

.sg-service-facts dd {
    margin: 0;
    color: var(--sg-ink);
    font-size: 15px;
    font-weight: 680;
}

.sg-service-facts dd time {
    font-variant-numeric: tabular-nums;
}

.sg-service-tabs {
    display: flex;
    gap: 22px;
    margin: 30px 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--sg-border);
}

.sg-service-tabs::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sg-service-tabs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: var(--sg-text-muted);
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}

.sg-service-tabs a.active,
.sg-service-tabs a:hover,
.sg-service-tabs a:focus {
    color: var(--sg-brand);
}

.sg-service-tabs a.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--sg-sun);
    content: "";
}

.sg-service-detail__panel {
    min-width: 0;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--sg-border);
    border-radius: 14px;
    background: var(--sg-surface);
}

.sg-service-tool-section + .sg-service-tool-section {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--sg-border);
}

.sg-service-tool-section h2 {
    margin: 0 0 18px;
    color: var(--sg-ink);
    font-size: 20px;
    font-weight: 780;
}

.sg-service-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.sg-service-detail-grid > div {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--sg-border);
    border-radius: 9px;
    background: var(--sg-surface-muted);
}

.sg-service-detail-grid dt {
    margin: 0 0 5px;
    color: var(--sg-text-muted);
    font-size: 12px;
    font-weight: 750;
}

.sg-service-detail-grid dd {
    margin: 0;
    color: var(--sg-ink);
    font-size: 14px;
    font-weight: 650;
}

.sg-service-status-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--sg-brand);
    font-weight: 700;
}

.sg-service-usage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.sg-service-usage-grid > div {
    padding: 18px;
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    background: var(--sg-surface-muted);
    text-align: center;
}

.sg-service-usage-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--sg-ink);
}

.sg-service-usage-grid .dial-usage {
    max-width: 100px;
    margin: 0 auto;
    border: 0;
    background: transparent;
    color: var(--sg-brand);
    font-size: 22px;
    font-weight: 800;
    text-align: center;
}

.sg-service-usage-grid p,
.sg-service-download p,
.sg-service-addon p {
    margin: 8px 0 0;
    color: var(--sg-text-secondary);
    font-size: 13px;
}

.sg-service-download,
.sg-service-addon {
    padding: 18px 0;
    border-bottom: 1px solid var(--sg-border);
}

.sg-service-download:last-child,
.sg-service-addon:last-child {
    border-bottom: 0;
}

.sg-service-download h3,
.sg-service-addon h3 {
    margin: 0;
    color: var(--sg-ink);
    font-size: 16px;
    font-weight: 750;
}

.sg-service-addon > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sg-service-addon .sg-status-pill {
    flex: 0 0 auto;
}

.sg-service-addon .btn,
.sg-service-download .btn {
    margin-top: 13px;
}

.sg-service-hook {
    margin-top: 18px;
}

.sg-service-detail .module-client-area {
    max-width: 100%;
    color: var(--sg-text-secondary);
    text-align: left;
}

/* Keep the rhythm at the module boundary.  Plugin-owned descendants remain
 * untouched; only direct output blocks participate in this spacing system. */
.sg-service-detail .module-client-area > * + * {
    margin-top: 16px;
}

.sg-service-detail .module-client-area > .alert[style*="margin-top"] {
    margin-top: 16px !important;
}

.sg-service-detail .module-client-area > form[style*="margin-left"] {
    margin-left: 0 !important;
}

.sg-service-detail .module-client-area > .panel[style*="margin-top"],
.sg-service-detail .module-client-area > .card[style*="margin-top"] {
    margin-top: 16px !important;
}

.sg-service-detail .module-client-area > form > button + button {
    margin-left: 8px;
}

.sg-service-detail .module-client-area > .btn,
.sg-service-detail .module-client-area > a.btn,
.sg-service-detail .module-client-area > button,
.sg-service-detail .module-client-area > input[type="submit"],
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"],
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"],
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="renew"] ~ button,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="renew"] ~ button,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="reset_panel_password"] ~ button,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="reset_panel_password"] ~ button,
.sg-service-detail .module-client-area > .panel > .panel-body > div > button[data-target="#mc-delivery-acceleration-modal"] {
    min-height: 38px;
    border-radius: 7px;
    box-shadow: none;
    font-weight: 700;
}

.sg-service-detail .module-client-area > .panel,
.sg-service-detail .module-client-area > .card {
    margin-top: 16px;
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    background: var(--sg-surface);
    box-shadow: none;
}

.sg-service-detail .module-client-area > .panel > .panel-heading,
.sg-service-detail .module-client-area > .card > .card-header {
    padding: 12px 16px;
}

.sg-service-detail .module-client-area > .panel > .panel-body,
.sg-service-detail .module-client-area > .card > .card-body {
    padding: 14px 16px;
}

.sg-service-detail .module-client-area > .form-control,
.sg-service-detail .module-client-area > select,
.sg-service-detail .module-client-area > textarea,
.sg-service-detail .module-client-area > .panel > .panel-body > form > .form-group > input[name="new_panel_password"],
.sg-service-detail .module-client-area > .panel > .panel-body > form > .form-group > input[name="confirm_panel_password"] {
    min-height: 40px;
    border: 1px solid var(--sg-border-strong);
    border-radius: 7px;
    background: var(--sg-surface);
    color: var(--sg-ink);
}

.sg-service-detail .module-client-area > .alert {
    border: 1px solid var(--sg-border);
    border-radius: 9px;
    box-shadow: none;
}

.sg-service-detail .module-client-area > table {
    width: 100%;
    border-color: var(--sg-border);
}

.sg-service-detail .module-client-area > .panel > .panel-body > code,
.sg-service-detail .module-client-area > .sungame-connection-info code {
    border: 1px solid var(--sg-border);
    border-radius: 7px;
    background: var(--sg-surface-muted);
    color: var(--sg-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Module styling ownership: mc_delivery owns every .mc-delivery-* pixel
 * component. Sungame controls only direct module outputs and exact action
 * hooks already emitted by the protected modules; it does not use recursive
 * generic selectors that could enter plugin-owned markup. */
.sg-service-detail .module-client-area > .btn-primary,
.sg-service-detail .module-client-area > a.btn-primary,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="reset_panel_password"] ~ button,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="reset_panel_password"] ~ button {
    border-color: var(--sg-brand);
    background: var(--sg-brand);
    color: var(--sg-brand-contrast);
}

.sg-service-detail .module-client-area > .btn-primary:hover,
.sg-service-detail .module-client-area > .btn-primary:focus,
.sg-service-detail .module-client-area > a.btn-primary:hover,
.sg-service-detail .module-client-area > a.btn-primary:focus,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="reset_panel_password"] ~ button:hover,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="reset_panel_password"] ~ button:focus,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="reset_panel_password"] ~ button:hover,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="reset_panel_password"] ~ button:focus {
    border-color: var(--sg-brand-hover);
    background: var(--sg-brand-hover);
    color: var(--sg-brand-contrast);
}

.sg-service-detail .module-client-area > .btn-success,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="renew"] ~ button,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="renew"] ~ button {
    border-color: var(--sg-brand);
    background: var(--sg-brand-soft);
    color: var(--sg-brand-dark);
}

.sg-service-detail .module-client-area > .btn-success:hover,
.sg-service-detail .module-client-area > .btn-success:focus,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="renew"] ~ button:hover,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="sungame_server_action"][value="renew"] ~ button:focus,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="renew"] ~ button:hover,
.sg-service-detail .module-client-area > .panel > .panel-body > form > input[name="mc_delivery_action"][value="renew"] ~ button:focus {
    border-color: var(--sg-brand);
    background: var(--sg-brand);
    color: var(--sg-brand-contrast);
}

.sg-service-detail .module-client-area > .btn-info,
.sg-service-detail .module-client-area > .btn-warning,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_start"],
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_restart"],
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="reinstall_server"],
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_start"],
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_restart"],
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="reinstall_server"],
.sg-service-detail .module-client-area > .panel > .panel-body > div > button[data-target="#mc-delivery-acceleration-modal"] {
    border-color: var(--sg-border-strong);
    background: var(--sg-surface-muted);
    color: var(--sg-ink);
}

.sg-service-detail .module-client-area > .btn-info:hover,
.sg-service-detail .module-client-area > .btn-info:focus,
.sg-service-detail .module-client-area > .btn-warning:hover,
.sg-service-detail .module-client-area > .btn-warning:focus,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_start"]:hover,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_start"]:focus,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_restart"]:hover,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_restart"]:focus,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="reinstall_server"]:hover,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="reinstall_server"]:focus,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_start"]:hover,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_start"]:focus,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_restart"]:hover,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_restart"]:focus,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="reinstall_server"]:hover,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="reinstall_server"]:focus,
.sg-service-detail .module-client-area > .panel > .panel-body > div > button[data-target="#mc-delivery-acceleration-modal"]:hover,
.sg-service-detail .module-client-area > .panel > .panel-body > div > button[data-target="#mc-delivery-acceleration-modal"]:focus {
    border-color: var(--sg-brand);
    background: var(--sg-surface);
    color: var(--sg-ink);
}

.sg-service-detail .module-client-area > .btn-danger,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_stop"],
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_stop"] {
    border-color: rgba(167, 55, 55, .45);
    background: transparent;
    color: var(--sg-danger);
}

.sg-service-detail .module-client-area > .btn-danger:hover,
.sg-service-detail .module-client-area > .btn-danger:focus,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_stop"]:hover,
.sg-service-detail .module-client-area > form > button[name="sungame_server_action"][value="power_stop"]:focus,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_stop"]:hover,
.sg-service-detail .module-client-area > form > button[name="mc_delivery_action"][value="power_stop"]:focus {
    border-color: var(--sg-danger);
    background: #fff4f4;
    color: var(--sg-danger);
}

.sg-service-detail .module-client-area .sungame-connection-info code {
    border-color: var(--sg-border-strong);
    background: var(--sg-surface-muted);
    color: var(--sg-ink);
    font-size: 13px;
}

.sg-service-detail__danger {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--sg-border);
}

.sg-service-detail__danger .btn {
    border-color: rgba(167, 55, 55, .45);
    background: transparent;
    color: var(--sg-danger);
}

.sg-service-detail__danger .btn:hover,
.sg-service-detail__danger .btn:focus {
    background: #fff4f4;
    color: var(--sg-danger);
}

/* Order-form commerce layer */
.sg-order-context .main-grid {
    gap: 22px;
}

.sg-order-form {
    --sg-order-accent: var(--sg-brand);
    --sg-order-accent-hover: var(--sg-brand-hover);
    --sg-order-accent-solid: var(--sg-brand);
    --sg-order-accent-solid-hover: var(--sg-brand-hover);
    --sg-order-accent-soft: var(--sg-brand-soft);
    --sg-order-surface-emphasis: var(--sg-surface-muted);
    --sg-order-border-strong: var(--sg-border-strong);
}

.sg-cart-layout {
    align-items: start;
}

.sg-cart-summary,
.sg-cart-layout .main-sidebar {
    min-width: 0;
}

.sg-cart-card .cart-heading {
    color: var(--sg-ink);
    font-weight: 780;
}

.sg-cart-card .cart-item {
    background: var(--sg-surface);
}

.sg-order-context .panel-summary,
.sg-order-context .panel-cart,
.sg-order-context .section-body > .panel,
.sg-order-context .section-body > .message {
    border-color: var(--sg-border);
    border-radius: 12px;
    box-shadow: none;
}

.sg-order-context .panel-summary {
    background: var(--sg-surface);
}

.sg-order-context .panel-summary .panel-heading,
.sg-order-context .panel-cart .panel-heading {
    border-bottom-color: var(--sg-border);
    background: var(--sg-surface-muted);
}

.sg-order-context .panel-summary .panel-title,
.sg-order-context .section-title {
    color: var(--sg-ink);
    font-weight: 780;
}

.sg-order-context .panel-check-group[data-inputs-container] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-right: 0;
    margin-left: 0;
}

.sg-order-context .sg-cycle-option {
    min-width: 0;
    width: auto;
    padding-right: 0;
    padding-left: 0;
}

.sg-order-context .panel-check-group[data-inputs-container] .panel-check {
    height: 100%;
    margin: 0;
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    background: var(--sg-surface);
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.sg-order-context .panel-check-group[data-inputs-container] .panel-check:hover,
.sg-order-context .panel-check-group[data-inputs-container] .panel-check:has(input:focus-visible) {
    border-color: var(--sg-brand);
}

.sg-order-context .panel-check-group[data-inputs-container] .panel-check.checked {
    border-color: var(--sg-brand);
    background: var(--sg-brand-soft);
    box-shadow: inset 0 0 0 1px var(--sg-brand);
}

/* The local WHMCS iCheck runtime still uses the legacy blue skin class.
 * Keep the provider and its events intact, but draw the visible control in
 * Sungame green within the order form. */
.sg-order-context .icheckbox_square-blue,
.sg-order-context .iradio_square-blue {
    width: 18px;
    height: 18px;
    border: 1px solid var(--sg-border-strong);
    background-color: var(--sg-surface);
    background-image: none;
    background-position: initial;
    border-radius: 5px;
}

.sg-order-context .iradio_square-blue {
    border-radius: 50%;
}

.sg-order-context .icheckbox_square-blue.hover,
.sg-order-context .icheckbox_square-blue.focus,
.sg-order-context .iradio_square-blue.hover,
.sg-order-context .iradio_square-blue.focus {
    border-color: var(--sg-brand);
}

.sg-order-context .icheckbox_square-blue.checked,
.sg-order-context .iradio_square-blue.checked {
    border-color: var(--sg-brand);
    background-color: var(--sg-brand);
    background-image: none;
}

.sg-order-context .icheckbox_square-blue.checked::after {
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    content: "";
    transform: rotate(45deg);
}

.sg-order-context .iradio_square-blue.checked::after {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.sg-order-context .panel-check-group[data-inputs-container] .check {
    position: relative;
    height: 100%;
}

.sg-order-context .panel-check-group[data-inputs-container] label {
    display: flex;
    height: 100%;
    min-height: 86px;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.sg-order-context .panel-check-group[data-inputs-container] .check-content {
    min-width: 0;
}

.sg-order-context .panel-check-group[data-inputs-container] .check-title {
    color: var(--sg-ink);
    font-size: 15px;
    font-weight: 760;
    line-height: 1.35;
}

.sg-order-context .panel-check-group[data-inputs-container] .check-subtitle {
    color: var(--sg-brand);
    font-size: 12px;
    font-weight: 750;
}

.sg-order-context .save {
    color: var(--sg-brand);
    font-weight: 750;
}

.sg-order-context #containerProductValidationErrors {
    border: 1px solid rgba(167, 55, 55, .35);
    border-radius: 9px;
    background: #fff6f6;
}

.sg-order-context #containerProductValidationErrors.hidden {
    display: none !important;
}

.sg-order-context .summary-list .item-value,
.sg-order-context .price-amount,
.sg-order-context .cart-item-price {
    font-variant-numeric: tabular-nums;
}

.sg-order-context .summary-list .item-name {
    color: var(--sg-text-secondary);
}

.sg-order-context .summary-list .list-item-main .item-name,
.sg-order-context .summary-list .list-item-main .item-value {
    color: var(--sg-ink);
    font-weight: 750;
}

.sg-order-context .summary-list .item-value .sg-currency-suffix,
.sg-order-context .price-amount .sg-currency-suffix {
    margin-left: .2em;
    color: var(--sg-text-secondary);
    font-size: .72em;
    font-weight: 650;
    letter-spacing: .02em;
}

.sg-price-display__amount {
    font-variant-numeric: tabular-nums;
}

.sg-price-display__currency {
    margin-left: .2em;
    color: var(--sg-text-secondary);
    font-size: .72em;
    font-weight: 650;
    letter-spacing: .02em;
    white-space: nowrap;
}

.sg-price-display__trailing {
    margin-left: .12em;
}

.sg-order-context .summary-list .list-item-main .item-value .sg-currency-suffix,
.sg-order-context .price-amount .sg-currency-suffix {
    color: inherit;
}

.sg-order-context .panel-cart .cart-item {
    border-bottom-color: var(--sg-border);
}

.sg-order-context .prod-name,
.sg-order-context .cart-item-title-main {
    color: var(--sg-ink);
    font-weight: 700;
}

.sg-order-context .prod-price,
.sg-order-context .item-price,
.sg-order-context .cart-item-title-small {
    color: var(--sg-text-secondary);
}

.sg-order-context .main-sidebar,
.sg-order-context .sidebar-sticky-summary {
    min-width: 0;
}

.sg-order-context .btn-checkout .ls,
.sg-order-context .btn-checkout .lm,
.sg-order-context #btnCompleteProductConfig .ls,
.sg-order-context #btnCompleteProductConfigMob .ls {
    display: none;
}

/* v1.3.7 Motion Polish: interaction-triggered, compositor-friendly movement
 * only.  No hover state is required for navigation or form functionality. */
.sg-body .sg-metric,
.sg-body .sg-home-product,
.sg-body .sg-service-card,
.sg-body .sg-dashboard-panel__item {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 160ms ease;
}

.sg-body .sg-metric:hover,
.sg-body .sg-metric:focus-visible,
.sg-body .sg-home-product:hover,
.sg-body .sg-home-product:focus-within,
.sg-body .sg-service-card:hover,
.sg-body .sg-service-card:focus-within {
    transform: translateY(-2px);
}

.sg-body .sg-dashboard-panel__item-arrow,
.sg-body .sg-service-card__action i,
.sg-body .sg-home-product__cta i {
    transition: transform 160ms ease;
}

.sg-body .sg-dashboard-panel__item:hover .sg-dashboard-panel__item-arrow,
.sg-body .sg-dashboard-panel__item:focus-visible .sg-dashboard-panel__item-arrow,
.sg-body .sg-service-card__action:hover i,
.sg-body .sg-service-card__action:focus-visible i,
.sg-body .sg-home-product__cta:hover i,
.sg-body .sg-home-product__cta:focus-visible i {
    transform: translateX(3px);
}

.sg-body input.form-control,
.sg-body select.form-control,
.sg-body textarea.form-control,
.sg-body .custom-select {
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sg-body input.form-control:focus,
.sg-body select.form-control:focus,
.sg-body textarea.form-control:focus,
.sg-body .custom-select:focus {
    border-color: var(--sg-brand);
    box-shadow: 0 0 0 3px rgba(11, 157, 141, .13);
}

/* Desktop dropdowns keep their existing open/close state and keyboard
 * ownership, while the visible state gets a short opacity/translate settle. */
@media (min-width: 981px) {
    .sg-body .sg-nav__dropdown,
    .sg-body .sg-account-dropdown {
        display: block;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-4px);
        transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
        visibility: hidden;
    }

    .sg-body .sg-nav__item.is-open > .sg-nav__dropdown,
    .sg-body .sg-account-menu.is-open .sg-account-dropdown {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }
}

.sg-body .sg-service-actions__menu {
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
    visibility: hidden;
}

.sg-body .sg-service-actions__dropdown.is-open .sg-service-actions__menu,
.sg-body .sg-service-actions__menu:focus-within {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.sg-body .sg-service-actions__menu[hidden] {
    display: block;
}

/* MassPay is a Client Area page, so it owns a compact Sungame surface here
 * instead of inheriting the order-form panel/table treatment.  The form and
 * every submitted value remain WHMCS-owned in masspay.tpl. */
.sg-masspay {
    max-width: 860px;
    margin: 0 auto;
    padding: 12px 0 48px;
}

.sg-masspay__header {
    margin-bottom: 26px;
}

.sg-masspay__eyebrow,
.sg-masspay__section-eyebrow,
.sg-masspay-invoice__label {
    margin: 0 0 8px;
    color: var(--sg-brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sg-masspay__title {
    margin: 0;
    color: var(--sg-ink);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 760;
    letter-spacing: -.045em;
    line-height: 1.1;
}

.sg-masspay__description {
    max-width: 40rem;
    margin: 12px 0 0;
    color: var(--sg-text-secondary);
    font-size: 15px;
    line-height: 1.65;
}

.sg-masspay__invoices,
.sg-masspay__summary,
.sg-masspay__payment {
    margin-top: 18px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-lg);
    background: var(--sg-surface);
    box-shadow: var(--sg-shadow-sm);
}

.sg-masspay__section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.sg-masspay__section-heading h2 {
    margin: 0;
    color: var(--sg-ink);
    font-size: 20px;
    font-weight: 760;
}

.sg-masspay__section-eyebrow {
    margin-bottom: 5px;
    color: var(--sg-text-muted);
    font-size: 10px;
}

.sg-masspay-invoice {
    padding: 18px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    background: var(--sg-surface-muted);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sg-masspay-invoice + .sg-masspay-invoice {
    margin-top: 12px;
}

.sg-masspay-invoice__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--sg-border);
}

.sg-masspay-invoice__header h3 {
    margin: 0;
    color: var(--sg-ink);
    font-size: 16px;
    font-weight: 760;
}

.sg-masspay-invoice__badge {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--sg-sun-soft);
    color: var(--sg-brand-dark);
    font-size: 11px;
    font-weight: 750;
}

.sg-masspay-invoice__items {
    display: grid;
    gap: 9px;
    padding-top: 14px;
}

.sg-masspay-invoice__item,
.sg-masspay-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.sg-masspay-invoice__item > span:first-child,
.sg-masspay-total dt {
    min-width: 0;
    color: var(--sg-text-secondary);
    line-height: 1.5;
}

.sg-masspay-invoice__amount,
.sg-masspay-total dd {
    flex: 0 0 auto;
    margin: 0;
    color: var(--sg-ink);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.sg-masspay-totals {
    display: grid;
    gap: 10px;
    margin: 0;
}

.sg-masspay-total--due {
    align-items: center;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--sg-border);
}

.sg-masspay-total--due dt,
.sg-masspay-total--due dd {
    color: var(--sg-ink);
    font-size: 16px;
    font-weight: 800;
}

.sg-masspay__payment-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.sg-masspay__payment-control label {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--sg-text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.sg-masspay__payment-control select {
    min-height: 44px;
}

.sg-masspay__payment-control .btn {
    min-height: 44px;
    white-space: nowrap;
}

.sg-masspay__payment-control .btn i {
    margin-left: 6px;
    transition: transform 160ms ease;
}

.sg-masspay__payment-control .btn:hover i,
.sg-masspay__payment-control .btn:focus-visible i {
    transform: translateX(3px);
}

.sg-masspay__empty {
    padding: 24px;
    border: 1px dashed var(--sg-border-strong);
    border-radius: var(--sg-radius-md);
    color: var(--sg-text-muted);
    text-align: center;
}

@media (max-width: 700px) {
    .sg-masspay {
        padding-top: 4px;
    }

    .sg-masspay__invoices,
    .sg-masspay__summary,
    .sg-masspay__payment {
        padding: 20px;
    }

    .sg-masspay__payment-control {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-masspay__payment-control .btn {
        width: 100%;
    }
}

@media (max-width: 980px) {
    .sg-home-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-order-context .panel-check-group[data-inputs-container] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* v1.5.12 Homepage Game Directory.  Keep one full-width entry per Game;
 * the legacy sg-home-product class remains on the entry so the existing
 * Standard/Liquid Glass surface and motion contracts continue to apply. */
.sg-body .sg-home-game-directory {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.sg-body .sg-home-product.sg-home-game {
    min-height: 0;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) minmax(190px, auto);
    align-items: center;
    gap: 26px;
    padding: 26px;
}

.sg-home-game__icon {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--sg-border-strong);
    border-radius: 24px;
    background: var(--sg-accent-soft);
    color: var(--sg-accent-solid);
    font-size: 34px;
}

.sg-home-game__icon img {
    display: block;
    width: 74%;
    height: 74%;
    max-width: 74%;
    max-height: 74%;
    object-fit: contain;
}

.sg-home-game__icon--wordmark img {
    width: 96%;
    height: auto;
    max-width: 96%;
    max-height: 96%;
}

.sg-home-game__body {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.sg-home-game__heading {
    min-width: 0;
}

.sg-home-game__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--sg-accent-solid);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

.sg-home-game__heading h3 {
    margin: 0;
    color: var(--sg-ink);
    font-size: clamp(21px, 2.4vw, 30px);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.sg-home-game__summary {
    max-width: 600px;
    margin: 0;
    color: var(--sg-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.sg-home-game__highlights {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sg-home-game__highlights li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    color: var(--sg-text-secondary);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sg-home-game__highlights li i {
    flex: 0 0 14px;
    width: 14px;
    margin-top: 3px;
    color: var(--sg-accent-solid);
    font-size: 11px;
    text-align: center;
}

.sg-home-game__footer {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 14px;
    padding-left: 24px;
    border-left: 1px solid var(--sg-border);
}

.sg-home-game__meta {
    color: var(--sg-text-muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
    white-space: nowrap;
}

.sg-home-game__cta {
    align-self: flex-end;
    flex: 0 0 auto;
    white-space: nowrap;
}

.sg-home-games-empty {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.sg-home-games-empty p {
    margin: 0;
    color: var(--sg-text-secondary);
}

@media (max-width: 760px) {
    .sg-body .sg-home-product.sg-home-game {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 20px;
    }

    .sg-home-game__icon {
        width: 76px;
        height: 76px;
        border-radius: 18px;
        font-size: 25px;
    }

    .sg-home-game__footer {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
        padding-top: 16px;
        padding-left: 0;
        border-top: 1px solid var(--sg-border);
        border-left: 0;
    }

    .sg-home-game__meta {
        min-width: 0;
        text-align: left;
        white-space: normal;
    }

    .sg-home-game__cta {
        align-self: center;
    }
}

@media (max-width: 390px) {
    .sg-home-game__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .sg-home-game__cta {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .sg-brand__image,
    .sg-footer__mark {
        width: 148px;
    }

    .sg-footer__brand-block {
        align-items: flex-start;
        flex-direction: column;
    }

    .sg-footer__inner {
        padding-top: 28px;
        padding-bottom: 20px;
    }

    .sg-footer__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 18px;
    }

    .sg-home-product-grid {
        grid-template-columns: 1fr;
    }

    .sg-home-product {
        min-height: 286px;
        padding: 20px;
    }

    .sg-home-product__footer {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .sg-home-product__cta {
        align-self: flex-start;
    }

    .sg-footer__watermark-zone {
        min-height: 104px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .sg-footer__watermark-lockup {
        width: 100%;
        max-width: 100%;
        align-self: stretch;
        gap: 12px;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .sg-footer__watermark-mark {
        width: 60px;
    }

    .sg-footer__watermark-wordmark {
        min-width: 0;
        width: auto;
    }

    .sg-footer__watermark-caption {
        flex: 0 1 auto;
        max-width: 100%;
        text-align: left;
    }

    .sg-footer__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .sg-service-hero,
    .sg-service-meta {
        grid-template-columns: 1fr;
    }

    .sg-service-hero {
        align-items: start;
        padding: 24px 20px;
    }

    .sg-service-hero::after {
        right: 20px;
        top: 20px;
    }

    .sg-service-actions {
        justify-content: flex-start;
    }

    .sg-service-actions .btn {
        flex: 1 1 auto;
    }

    .sg-service-actions__dropdown {
        flex: 1 1 auto;
    }

    .sg-service-actions__toggle {
        width: 100%;
    }

    .sg-service-actions__menu {
        right: auto;
        left: 0;
    }

    .sg-service-detail-grid,
    .sg-service-usage-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sg-order-context .panel-check-group[data-inputs-container] {
        grid-template-columns: none;
    }

    .sg-service-fact,
    .sg-service-fact:nth-child(n + 4) {
        grid-column: 1 / -1;
    }

    .sg-order-context .panel-check-group[data-inputs-container] label {
        min-height: 74px;
    }

    .sg-address__value {
        font-size: 12px;
    }
}

/* v1.4.1 Client Motion & Billing Layout Seal.  Reveal state is opt-in from
 * the small footer observer; without JS or IntersectionObserver every target
 * stays visible by default. */
@keyframes sg-footer-watermark-reveal {
    0% {
        clip-path: inset(0 100% 0 0);
        -webkit-clip-path: inset(0 100% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
        -webkit-clip-path: inset(0 0 0 0);
    }
}

@keyframes sg-section-reveal {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sg-footer__watermark-zone {
    overflow: hidden;
}

.sg-footer__watermark-lockup {
    opacity: 1;
    transform: none;
}

.sg-body .sg-reveal-pending {
    opacity: 0;
    transform: translateY(14px);
}

.sg-body .sg-footer__watermark-lockup.sg-reveal-pending {
    opacity: 1;
    transform: none;
    clip-path: inset(0 100% 0 0);
    -webkit-clip-path: inset(0 100% 0 0);
}

.sg-body .sg-revealed {
    animation: sg-section-reveal 520ms cubic-bezier(.22, .8, .28, 1) both;
}

.sg-body .sg-footer__watermark-lockup.sg-revealed {
    animation: sg-footer-watermark-reveal 1.8s ease-in-out both;
}

@supports ((mask-image: linear-gradient(90deg, #000, #000)) or (-webkit-mask-image: linear-gradient(90deg, #000, #000))) {
    .sg-body .sg-footer__watermark-lockup.sg-reveal-pending,
    .sg-body .sg-footer__watermark-lockup.sg-revealed {
        clip-path: none;
        -webkit-clip-path: none;
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 47%, rgba(0, 0, 0, .72) 49%, rgba(0, 0, 0, .24) 51%, transparent 53%, transparent 100%);
        mask-image: linear-gradient(90deg, #000 0, #000 47%, rgba(0, 0, 0, .72) 49%, rgba(0, 0, 0, .24) 51%, transparent 53%, transparent 100%);
        -webkit-mask-position: 100% 0;
        mask-position: 100% 0;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: 220% 100%;
        mask-size: 220% 100%;
    }

    @keyframes sg-footer-watermark-reveal-mask {
        from {
            -webkit-mask-position: 100% 0;
            mask-position: 100% 0;
        }

        to {
            -webkit-mask-position: 0 0;
            mask-position: 0 0;
        }
    }

    .sg-body .sg-footer__watermark-lockup.sg-revealed {
        animation-name: sg-footer-watermark-reveal-mask;
    }
}

.sg-account-dropdown__divider + .sg-account-dropdown__divider {
    display: none;
}

.sg-body .sg-button,
.sg-body .btn {
    transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, color 200ms ease, transform 200ms ease;
}

.sg-body .sg-button:not(:disabled):not(.disabled):not([aria-disabled="true"]):hover,
.sg-body .sg-button:not(:disabled):not(.disabled):not([aria-disabled="true"]):focus-visible,
.sg-body .btn:not(:disabled):not(.disabled):not([aria-disabled="true"]):hover,
.sg-body .btn:not(:disabled):not(.disabled):not([aria-disabled="true"]):focus-visible {
    transform: translateY(-1px);
}

.sg-body .sg-home-product,
.sg-body .sg-service-card,
.sg-body .sg-invoice-card,
.sg-body .sg-quote-card {
    transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, color 200ms ease;
}

.sg-body .sg-home-product:hover,
.sg-body .sg-home-product:focus-within,
.sg-body .sg-service-card:hover,
.sg-body .sg-service-card:focus-within,
.sg-body .sg-invoice-card:hover,
.sg-body .sg-invoice-card:focus-within,
.sg-body .sg-quote-card:hover,
.sg-body .sg-quote-card:focus-within {
    box-shadow: var(--sg-shadow-md);
    transform: translateY(-3px);
}

.sg-body .sg-invoice-overview {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(112px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
    padding: 22px 24px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-lg);
    background: var(--sg-surface);
    box-shadow: var(--sg-shadow-sm);
}

.sg-body .sg-invoice-overview__intro,
.sg-body .sg-invoice-overview__stat {
    min-width: 0;
}

.sg-body .sg-invoice-overview__intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 12px;
}

.sg-body .sg-invoice-overview__eyebrow {
    margin: 0 0 7px;
    color: var(--sg-brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

.sg-body .sg-invoice-overview__title {
    margin: 0;
    color: var(--sg-ink);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 760;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.sg-body .sg-invoice-overview__description {
    margin: 8px 0 0;
    color: var(--sg-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.sg-body .sg-invoice-overview__stat {
    display: flex;
    min-height: 96px;
    flex-direction: column;
    justify-content: center;
    padding: 15px 16px;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md);
    background: var(--sg-surface-emphasis);
}

.sg-body .sg-invoice-overview__label {
    color: var(--sg-text-muted);
    font-size: 12px;
    font-weight: 650;
}

.sg-body .sg-invoice-overview__value {
    margin-top: 7px;
    color: var(--sg-ink);
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    font-variant-numeric: tabular-nums;
    font-weight: 780;
    line-height: 1;
}

.sg-body .sg-invoice-overview__stat--all {
    border-color: rgba(20, 91, 66, .20);
    background: #f0f8f4;
}

.sg-body .sg-invoice-overview__stat--all .sg-invoice-overview__value {
    color: var(--sg-brand);
}

.sg-body .sg-invoice-overview__stat--pending {
    border-color: #ead8ac;
    background: #fff9e9;
}

.sg-body .sg-invoice-overview__stat--pending .sg-invoice-overview__value {
    color: #765018;
}

.sg-body .sg-invoice-overview__stat--paid {
    border-color: #b8d9c9;
    background: #edf8f2;
}

.sg-body .sg-invoice-overview__stat--paid .sg-invoice-overview__value {
    color: #1d6647;
}

.sg-body .sg-invoices-page,
.sg-body .sg-quotes-page {
    overflow: visible;
}

.sg-body .sg-invoice-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 12px;
    margin: 0 0 14px;
}

.sg-body .sg-invoice-filters__label {
    color: var(--sg-text-muted);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
}

.sg-body .sg-invoice-filters .view-filter-btns {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.sg-body .sg-invoice-filters .view-filter-btns a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--sg-border);
    border-radius: 999px;
    background: var(--sg-surface);
    color: var(--sg-text-secondary);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sg-body .sg-invoice-filters .view-filter-btns a:hover,
.sg-body .sg-invoice-filters .view-filter-btns a:focus-visible {
    border-color: var(--sg-border-strong);
    background: var(--sg-surface-muted);
    color: var(--sg-ink);
    transform: translateY(-1px);
}

.sg-body .sg-invoice-filters .view-filter-btns a.active {
    border-color: var(--sg-accent);
    background: var(--sg-accent-soft);
    color: var(--sg-accent-solid);
}

.sg-body .sg-invoice-filters .view-filter-btns .status.status-unpaid,
.sg-body .sg-invoice-filters .view-filter-btns .status.status-pending,
.sg-body .sg-invoice-filters .view-filter-btns .status.status-payment-pending,
.sg-body .sg-invoice-filters .view-filter-btns .status.status-paymentpending {
    color: #765018;
}

.sg-body .sg-invoice-filters .view-filter-btns .status.status-paid {
    color: #1d6647;
}

.sg-body .sg-invoice-filters .view-filter-btns .status.status-cancelled {
    color: #657171;
}

.sg-body .sg-card-list {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.sg-body .sg-card-list thead th {
    padding: 0 14px 3px;
    border: 0;
    color: var(--sg-text-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sg-body .sg-card-list tbody tr.sg-invoice-card,
.sg-body .sg-card-list tbody tr.sg-quote-card {
    cursor: pointer;
}

.sg-body .sg-card-list tbody tr.sg-invoice-card td,
.sg-body .sg-card-list tbody tr.sg-quote-card td {
    padding: 16px 14px;
    border-top: 1px solid var(--sg-border);
    border-bottom: 1px solid var(--sg-border);
    background: var(--sg-surface);
    color: var(--sg-text-secondary);
    vertical-align: middle;
}

.sg-body .sg-card-list tbody tr.sg-invoice-card td:first-child,
.sg-body .sg-card-list tbody tr.sg-quote-card td:first-child {
    border-left: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-md) 0 0 var(--sg-radius-md);
    color: var(--sg-ink);
    font-weight: 750;
}

.sg-body .sg-card-list tbody tr.sg-invoice-card td:last-child,
.sg-body .sg-card-list tbody tr.sg-quote-card td:last-child {
    border-right: 1px solid var(--sg-border);
    border-radius: 0 var(--sg-radius-md) var(--sg-radius-md) 0;
}

.sg-body .sg-card-list tbody tr.sg-invoice-card:hover td,
.sg-body .sg-card-list tbody tr.sg-invoice-card:focus-within td,
.sg-body .sg-card-list tbody tr.sg-quote-card:hover td,
.sg-body .sg-card-list tbody tr.sg-quote-card:focus-within td {
    border-color: var(--sg-border-strong);
}

.sg-body .sg-invoice-card td[data-label="创建日期"],
.sg-body .sg-invoice-card td[data-label="到期日"],
.sg-body .sg-quote-card td[data-label="创建日期"],
.sg-body .sg-quote-card td[data-label="有效期"] {
    white-space: nowrap;
}

.sg-body .sg-invoice-card__action,
.sg-body .sg-quote-card__action {
    cursor: default;
    text-align: right;
    white-space: nowrap;
}

.sg-body .sg-invoice-card__view {
    min-width: 72px;
}

.sg-body .sg-quote-card__action form {
    margin: 0;
}

.sg-body .sg-invoice-card .label.status,
.sg-body .sg-quote-card .label.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
}

.sg-body .sg-invoice-card .status.status-unpaid,
.sg-body .sg-invoice-card .status.status-pending,
.sg-body .sg-invoice-card .status.status-payment-pending,
.sg-body .sg-invoice-card .status.status-paymentpending {
    border-color: #ead8ac;
    background: #fff9e9;
    color: #765018;
}

.sg-body .sg-invoice-card .status.status-paid {
    border-color: #b8d9c9;
    background: #edf8f2;
    color: #1d6647;
}

.sg-body .sg-invoice-card .status.status-cancelled {
    border-color: #d7dede;
    background: #f1f3f3;
    color: #657171;
}

@media (max-width: 767px) {
    .sg-body .sg-invoice-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 18px;
    }

    .sg-body .sg-invoice-overview__intro {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .sg-body .sg-card-list {
        display: block;
        border-spacing: 0;
    }

    .sg-body .sg-card-list thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .sg-body .sg-card-list tbody {
        display: block;
    }

    .sg-body .sg-card-list tbody tr.sg-invoice-card,
    .sg-body .sg-card-list tbody tr.sg-quote-card {
        display: block;
        margin: 0 0 10px;
        padding: 7px 0;
        border: 1px solid var(--sg-border);
        border-radius: var(--sg-radius-md);
        background: var(--sg-surface);
        box-shadow: var(--sg-shadow-sm);
    }

    .sg-body .sg-card-list tbody tr.sg-invoice-card td,
    .sg-body .sg-card-list tbody tr.sg-quote-card td {
        display: grid;
        grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
        gap: 12px;
        align-items: center;
        padding: 10px 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-align: right;
        white-space: normal;
        word-break: break-word;
    }

    .sg-body .sg-card-list tbody tr.sg-invoice-card td::before,
    .sg-body .sg-card-list tbody tr.sg-quote-card td::before {
        content: attr(data-label);
        color: var(--sg-text-muted);
        font-size: 11px;
        font-weight: 650;
        text-align: left;
    }

    .sg-body .sg-card-list tbody tr.sg-invoice-card td:first-child,
    .sg-body .sg-card-list tbody tr.sg-quote-card td:first-child {
        padding-top: 14px;
        border: 0;
        border-radius: 0;
    }

    .sg-body .sg-card-list tbody tr.sg-invoice-card td:last-child,
    .sg-body .sg-card-list tbody tr.sg-quote-card td:last-child {
        padding-bottom: 14px;
        border: 0;
        border-radius: 0;
    }

    .sg-body .sg-invoice-card__action,
    .sg-body .sg-quote-card__action {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .sg-body .sg-invoice-card__action::before,
    .sg-body .sg-quote-card__action::before {
        flex: 0 0 auto;
    }

    .sg-body .sg-quote-card__action form,
.sg-body .sg-invoice-card__action .sg-invoice-card__view {
        margin-left: auto;
    }
}

/* DataTables keeps its own behavior and markup.  This invoice-only grid
 * gives the toolbar a stable desktop/mobile surface while the table remains
 * the same semantic data source. */
.sg-body .sg-invoices-page .dataTables_wrapper {
    display: grid;
    grid-template-columns: max-content max-content minmax(220px, 1fr);
    grid-template-rows: auto auto auto;
    gap: 12px 16px;
    align-items: center;
}

.sg-body .sg-invoices-page .dataTables_wrapper > .listtable {
    display: contents;
}

.sg-body .sg-invoices-page .dataTables_info {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    color: var(--sg-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.sg-body .sg-invoices-page .dataTables_length {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    color: var(--sg-text-muted);
    font-size: 12px;
}

.sg-body .sg-invoices-page .dataTables_filter {
    grid-column: 3;
    grid-row: 1;
    justify-self: stretch;
    min-width: 0;
    margin: 0;
    text-align: right;
}

.sg-body .sg-invoices-page .dataTables_filter label,
.sg-body .sg-invoices-page .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--sg-text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.sg-body .sg-invoices-page .dataTables_filter label {
    width: 100%;
    justify-content: flex-end;
}

.sg-body .sg-invoices-page .dataTables_filter input,
.sg-body .sg-invoices-page .dataTables_length select {
    min-height: 40px;
    border: 1px solid var(--sg-border-strong);
    border-radius: 10px;
    background: var(--sg-surface);
    color: var(--sg-text);
    box-shadow: var(--sg-shadow-sm);
    font-size: 13px;
}

.sg-body .sg-invoices-page .dataTables_filter input {
    width: min(320px, 100%);
    margin: 0;
    padding: 8px 12px;
}

.sg-body .sg-invoices-page .dataTables_length select {
    min-width: 68px;
    margin: 0;
    padding: 8px 26px 8px 10px;
}

.sg-body .sg-invoices-page .dataTables_wrapper > .listtable > table {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    min-width: 0;
}

.sg-body .sg-invoices-page .dataTables_paginate {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: end;
    max-width: 100%;
    margin: 0;
    text-align: right;
}

.sg-body .sg-invoices-page .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    margin: 0 0 0 5px;
    padding: 6px 9px;
    border: 1px solid var(--sg-border);
    border-radius: 9px;
    background: var(--sg-surface);
    color: var(--sg-text) !important;
    line-height: 1.2;
    cursor: pointer;
}

.sg-body .sg-invoices-page .dataTables_paginate .paginate_button.current,
.sg-body .sg-invoices-page .dataTables_paginate .paginate_button.current:hover {
    border-color: var(--sg-accent);
    background: var(--sg-accent);
    color: #fff !important;
}

.sg-body .sg-invoices-page .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
.sg-body .sg-invoices-page .dataTables_paginate .paginate_button:focus-visible:not(.disabled):not(.current) {
    border-color: var(--sg-accent);
    background: var(--sg-surface-muted);
    color: var(--sg-accent) !important;
}

.sg-body .sg-invoices-page .dataTables_paginate .paginate_button.disabled,
.sg-body .sg-invoices-page .dataTables_paginate .paginate_button.disabled:hover {
    opacity: .48;
    cursor: default;
}

@media (max-width: 640px) {
    .sg-body .sg-invoice-filters {
        align-items: flex-start;
        flex-direction: column;
    }

    .sg-body .sg-invoice-filters .view-filter-btns {
        width: 100%;
    }

    .sg-body .sg-invoices-page .dataTables_wrapper {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        gap: 10px;
    }

    .sg-body .sg-invoices-page .dataTables_filter {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .sg-body .sg-invoices-page .dataTables_filter label {
        justify-content: stretch;
    }

    .sg-body .sg-invoices-page .dataTables_filter input {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .sg-body .sg-invoices-page .dataTables_length {
        grid-column: 1;
        grid-row: 2;
    }

    .sg-body .sg-invoices-page .dataTables_info {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
    }

    .sg-body .sg-invoices-page .dataTables_wrapper > .listtable > table {
        grid-row: 3;
    }

    .sg-body .sg-invoices-page .dataTables_paginate {
        grid-row: 4;
        justify-self: stretch;
        overflow-x: auto;
        padding-bottom: 2px;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sg-body .sg-reveal-pending,
    .sg-body .sg-revealed,
    .sg-body .sg-footer__watermark-lockup {
        animation: none;
        opacity: 1;
        transform: none;
        clip-path: inset(0 0 0 0);
        -webkit-clip-path: inset(0 0 0 0);
        -webkit-mask-image: none;
        mask-image: none;
    }

    .sg-cta-arrow,
    .sg-order-context .panel-check-group[data-inputs-container] .panel-check,
    .sg-body .sg-metric,
    .sg-body .sg-home-product,
    .sg-body .sg-service-card,
    .sg-body .sg-invoice-card,
    .sg-body .sg-quote-card,
    .sg-body .sg-dashboard-panel__item,
    .sg-body .sg-dashboard-panel__item-arrow,
    .sg-body .sg-service-card__action i,
    .sg-body .sg-home-product__cta i,
    .sg-body .sg-button,
    .sg-body .btn,
    .sg-body input.form-control,
    .sg-body select.form-control,
    .sg-body textarea.form-control,
    .sg-body .custom-select,
    .sg-body .sg-nav__dropdown,
    .sg-body .sg-account-dropdown,
    .sg-body .sg-service-actions__menu,
    .sg-masspay-invoice,
    .sg-masspay__payment-control .btn i {
        transition: none;
    }

    .sg-body .sg-metric:hover,
    .sg-body .sg-metric:focus-visible,
    .sg-body .sg-home-product:hover,
    .sg-body .sg-home-product:focus-within,
    .sg-body .sg-service-card:hover,
    .sg-body .sg-service-card:focus-within,
    .sg-body .sg-invoice-card:hover,
    .sg-body .sg-invoice-card:focus-within,
    .sg-body .sg-quote-card:hover,
    .sg-body .sg-quote-card:focus-within,
    .sg-body .sg-dashboard-panel__item:hover .sg-dashboard-panel__item-arrow,
    .sg-body .sg-dashboard-panel__item:focus-visible .sg-dashboard-panel__item-arrow,
    .sg-body .sg-service-card__action:hover i,
    .sg-body .sg-service-card__action:focus-visible i,
    .sg-body .sg-home-product__cta:hover i,
    .sg-body .sg-home-product__cta:focus-visible i,
    .sg-body .sg-nav__dropdown,
    .sg-body .sg-account-dropdown,
    .sg-body .sg-service-actions__menu,
    .sg-masspay__payment-control .btn:hover i,
    .sg-masspay__payment-control .btn:focus-visible i {
        transform: none;
    }

}
