/* Portal presentation, scoped to the Truly Cloud theme. */
.tc-theme .section-main > .section-account-header {
    margin-bottom: 1.3rem !important;
}
.tc-theme .section-main > .section-account-header h1 {
    color: var(--tc-ink);
    font-weight: 750;
}
.tc-theme .section-main > :is(h5, .section-account-header + .d-flex) {
    color: var(--tc-copy);
}
.tc-theme .section-main > h5.my-5 {
    margin-block: 1rem !important;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .text-secondary {
    color: var(--tc-copy) !important;
}

/* Clear, compact navigation across account, billing, contacts and security. */
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .nav-tabs-wrapper {
    margin-block: 1rem;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .nav-tabs {
    border: 0;
    min-height: 3rem;
    padding: 0.3rem;
    background: var(--tc-panel);
    border-radius: 0.65rem;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .nav-tabs .nav-link {
    padding: 0.65rem 0.85rem;
    border: 0;
    border-radius: 0.4rem;
    color: var(--tc-ink);
    font-size: 0.96rem;
    font-weight: 650;
    line-height: 1.35;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .nav-tabs :is(.nav-item.active > .nav-link, .nav-link.active) {
    background: var(--tc-blue);
    color: #fff;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .nav-tabs .indicator {
    display: none;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .section-account {
    margin-top: 1rem;
}

/* Table styles retain native sort links, actions and status values. */
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .table-responsive {
    border: 1px solid var(--tc-line);
    border-radius: 0.65rem;
    background: var(--tc-panel);
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) table.table {
    margin-bottom: 0;
    color: var(--tc-ink);
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .table thead :is(th, td),
.tc-theme .cloud > table.tonapp:not(.server-list) thead :is(th,td) {
    padding: 0.8rem 0.85rem;
    background: #16223a;
    color: #fff;
    border-color: #16223a;
    font-weight: 700;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .table thead a {
    color: #fff;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .table thead .sort-icon {
    color: #87c6e5;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .table tbody tr > :is(th,td),
.tc-theme .cloud > table.tonapp:not(.server-list) tbody tr > td {
    padding: 0.8rem 0.85rem;
    border-color: var(--tc-line);
    background: #fff;
    color: var(--tc-ink);
    vertical-align: middle;
}
.tc-theme .section-main:is(.tc-account-review, .tc-billing-review, .tc-contacts-review, .tc-security-review) .table tbody tr:nth-child(even) > :is(th,td),
.tc-theme .cloud > table.tonapp:not(.server-list) tbody tr:nth-child(even) > td {
    background: #f3f8fc;
}
.tc-theme .section-main:is(.tc-billing-review, .tc-contacts-review) .table tbody a:not(.dropdown-item) {
    color: var(--tc-blue);
    font-weight: 650;
}
.tc-theme .section-main :is(.badge-Paid, .badge-Unpaid, .badge-Overdue) {
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.3;
}
.tc-theme .section-main .badge-Paid {
    background: #e3f3eb;
    color: #176943;
}
.tc-theme .section-main :is(.badge-Unpaid, .badge-Overdue) {
    background: #fbe7e9;
    color: #b42332;
}
.tc-theme .section-dashboard .info-box-invoices thead :is(td,th) {
    background: var(--tc-tint);
    color: var(--tc-ink);
    font-weight: 700;
}

/* Account forms and security sections. */
.tc-theme .tc-account-review > .section-account,
.tc-theme .tc-security-review :is(.section-ipaccess, .section-ssh) {
    padding: clamp(1rem,2vw,1.5rem);
    border: 1px solid var(--tc-line);
    border-top: 3px solid var(--tc-blue);
    border-radius: 0.7rem;
    background: var(--tc-panel);
}
.tc-theme .tc-account-review .section-account .form-horizontal > h3 {
    margin-top: 1.3rem !important;
    color: var(--tc-ink);
    font-size: 1.2rem;
    font-weight: 700;
}
.tc-theme .tc-account-review .control-group {
    margin-block: 0.8rem;
}
.tc-theme .tc-account-review .control-group .controls > :is(input,select):not([type="checkbox"],[type="radio"],[type="hidden"]),
.tc-theme .tc-account-review #RecordsPerPage,
.tc-theme .tc-account-review #DefaultTimezone,
.tc-theme .tc-account-review #DefaultPaymentModule {
    width: min(100%,32rem);
}
.tc-theme .tc-account-review .form-horizontal > .control-group select.form-control {
    width: min(100%,32rem);
    min-width: 0 !important;
}
.tc-theme .tc-account-review .table-responsive {
    border: 0;
}
.tc-theme .tc-security-review .security-myip {
    margin: 0 0 1.25rem;
    padding: 0.8rem;
    border: 1px solid var(--tc-line);
    border-radius: 0.5rem;
    background: var(--tc-tint);
}
.tc-theme .tc-security-review .section-ipaccess > .mt-5 {
    margin-top: 1.2rem !important;
}
.tc-theme .tc-security-review .input-self-box {
    max-width: 48rem;
    padding: 0.5rem;
    border: 1px solid var(--tc-line);
    border-radius: 0.5rem;
    margin-inline: 0;
}
.tc-theme #SecurityContent .input-self-box .btn-success,
.tc-theme .tc-contacts-review .btn-success {
    background: var(--tc-blue) !important;
    border-color: var(--tc-blue) !important;
}
.tc-theme #SecurityContent .input-self-box .btn-success:hover,
.tc-theme .tc-contacts-review .btn-success:hover {
    background: var(--tc-blue-hover) !important;
}
.tc-theme .section-main:is(.tc-security-review,.tc-contacts-review) .btn-success {
    border-color: var(--tc-blue);
    background: var(--tc-blue);
    color: #fff;
}
.tc-theme .section-main:is(.tc-security-review,.tc-contacts-review) .btn-success:hover {
    border-color: var(--tc-blue-hover);
    background: var(--tc-blue-hover);
}
.tc-theme .tc-billing-review > .section-account-header > .d-flex > div {
    padding: 0.8rem 1rem;
    border: 1px solid var(--tc-line);
    border-radius: 0.6rem;
    background: var(--tc-panel);
}
.tc-theme .tc-billing-review #invoice_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tc-theme .tc-billing-review > .d-flex.mb-5,
.tc-theme .tc-contacts-review > .section-account-header .my-4 {
    margin-block: 1rem !important;
}

/* Existing service detail values arranged in a compact card. */
.tc-theme .section-account-service .service-details {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    overflow: hidden;
    border: 1px solid var(--tc-line);
    border-top: 3px solid var(--tc-blue);
    border-radius: 0.7rem;
    background: var(--tc-panel);
}
.tc-theme .section-account-service .service-details > hr { display: none; }
.tc-theme .section-account-service .service-details-line {
    width: auto;
    min-width: 0;
    padding: 1rem 1.2rem !important;
    border-bottom: 1px solid var(--tc-line);
    background: transparent;
    color: var(--tc-ink);
}
.tc-theme .section-account-service .service-details-line > small {
    color: var(--tc-copy);
    font-size: 0.85rem;
}
.tc-theme .section-account-service .service-details-line > span {
    font-size: 1rem;
}

/* A consistent vertical CloudStack menu on every view. */
.tc-theme .cloud.tc-cloud-portal,
.tc-theme .cloud.tc-cloud-portal:has(> #content-cloud table.server-list) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}
.tc-theme .cloud.tc-cloud-portal > .tc-cloud-page-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 100%;
    width: 100%;
    position: static;
    margin: 0;
    padding: 0;
    background: none;
    white-space: normal;
    overflow-wrap: anywhere;
}
.tc-theme .cloud.tc-cloud-portal .tc-cloud-title-logo {
    display: inline-block;
    flex: 0 0 2rem;
    width: 2rem;
    height: 1.8rem;
    padding: 0;
    margin: 0;
    color: var(--tc-blue);
    font-size: 1.8rem;
    line-height: 1;
}
.tc-theme .cloud.tc-cloud-portal > :is(.cloud-top,#nav-onapp) {
    flex: 0 0 14rem;
    width: 14rem;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.tc-theme .cloud.tc-cloud-portal > #content-cloud {
    flex: 1 1 22rem;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
}
.tc-theme .cloud.tc-cloud-portal .cloud-header { position: static; }
.tc-theme .cloud.tc-cloud-portal > .clear { display: none; }
.tc-theme .cloud.tc-cloud-portal .cloud-nav { width: 100%; margin: 0; }
.tc-theme .cloud.tc-cloud-portal :is(.cloud-nav,#nav-onapp) > .level-1,
.tc-theme .cloud.tc-cloud-portal:has(> #content-cloud table.server-list) :is(.cloud-nav,#nav-onapp) > .level-1 {
    display: flex;
    flex-direction: column !important;
    flex-wrap: nowrap;
    gap: 0.2rem;
    width: 100%;
    margin: 0 !important;
    padding: 0.55rem;
    border: 1px solid var(--tc-line);
    border-radius: 0.6rem;
    background: var(--tc-panel);
    list-style: none;
}
.tc-theme .cloud.tc-cloud-portal :is(.cloud-nav,#nav-onapp) > .level-1 > li {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    background: transparent;
}
.tc-theme .cloud.tc-cloud-portal :is(.cloud-nav,#nav-onapp) > .level-1 > li > a,
.tc-theme .cloud.tc-cloud-portal:has(> #content-cloud table.server-list) :is(.cloud-nav,#nav-onapp) > .level-1 > li > a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.65rem;
    padding: 0.65rem 0.7rem !important;
    border: 0 !important;
    border-radius: 0.4rem;
    box-shadow: none !important;
    color: var(--tc-copy) !important;
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.tc-theme .cloud.tc-cloud-portal :is(.cloud-nav,#nav-onapp) > .level-1 > .current-menu-item > a {
    color: var(--tc-blue) !important;
    font-weight: 700;
}
.tc-theme .cloud.tc-cloud-datacentre :is(.cloud-nav,#nav-onapp) > .level-1 > .current-menu-item > a,
.tc-theme .cloud.tc-cloud-portal :is(.cloud-nav,#nav-onapp) > .level-1 > li > a:hover {
    background: var(--tc-tint);
    color: var(--tc-blue) !important;
}
.tc-theme .cloud.tc-cloud-portal .tc-cloud-nav-icon {
    flex: 0 0 1.2rem;
    color: var(--tc-blue);
    font-size: 1.2rem;
}
.tc-theme .cloud.tc-cloud-portal .dropdown-toggle .caret { margin-inline-start: auto; }
.tc-theme .cloud.tc-cloud-portal .dropdown-menu {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none;
    width: 100%;
    min-width: 0;
    padding: 0.25rem 0 0.25rem 0.65rem;
    border: 0;
    border-inline-start: 2px solid var(--tc-line);
    box-shadow: none;
    background: transparent;
}
.tc-theme .cloud.tc-cloud-portal .dropdown-menu li { padding: 0; }
.tc-theme .cloud.tc-cloud-portal .dropdown-menu li > a {
    display: block;
    padding: 0.55rem 0.6rem;
    border-radius: 0.35rem;
    color: var(--tc-copy);
    font-size: 0.9rem;
    white-space: normal;
}
.tc-theme .cloud.tc-cloud-portal .dropdown-menu :is(li.active > a,a:hover) {
    background: var(--tc-tint);
    color: var(--tc-blue);
    font-weight: 650;
}
.tc-theme .cloud.tc-cloud-portal .current-menu-item > .dropdown-menu { display: block; }
.tc-theme .cloud #content-cloud .notice {
    padding: 0.9rem 1rem;
    border: 1px solid var(--tc-line);
    border-radius: 0.5rem;
    background: var(--tc-tint);
    color: #234563;
    line-height: 1.5;
}
.tc-theme .cloud > table.tonapp:not(.server-list) {
    table-layout: auto;
    overflow: hidden;
    border: 1px solid var(--tc-line);
    border-radius: 0.65rem;
    background: var(--tc-panel);
}
.tc-theme .cloud:has(> table.tonapp:not(.server-list)) {
    display: block;
    overflow-x: auto;
}
.tc-theme .cloud > table.tonapp:not(.server-list) :is(th,td):nth-child(n+4) {
    width: auto !important;
    min-width: 6rem;
    white-space: nowrap;
}
.tc-theme .cloud > table.tonapp:not(.server-list) td:last-child {
    min-width: 9rem;
}
.tc-theme .cloud > table.tonapp:not(.server-list) tbody a:not(.iphone_switch) {
    color: var(--tc-blue);
    font-weight: 700;
}
.tc-theme .cloud > table.tonapp:not(.server-list) .vm-status-pending {
    display: inline-block;
    width: auto;
    height: auto;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    background: #e3f3eb;
    color: #176943;
    font-weight: 700;
    text-align: center;
}
.tc-theme .cloud-resources .progress-bar {
    display: block;
    overflow: hidden;
    width: 100%;
    height: 0.75rem;
    border-radius: 0.45rem;
    background: #e7eef4;
}
.tc-theme .cloud-resources .progress-bar > .bar {
    float: none;
    height: 100%;
    max-width: 100%;
    min-width: 0;
}
.tc-theme .cloud-resources .progress-bar > .bar.green { background: #096088; }
.tc-theme .cloud-resources .progress-bar > .bar.red { background: #c72d3d; }

/* Veeam service only. Meter values and history stay native HostBill content. */
.tc-theme .tc-veeam-billing {
    color: var(--tc-ink);
    min-width: 0;
}
.tc-theme .tc-veeam-billing > .widget-append > .mseparator { height: 0.85rem; }
.tc-theme .tc-meter-overview,
.tc-theme .tc-veeam-billing #pricingdetails {
    padding: clamp(1rem,2vw,1.4rem);
    border: 1px solid var(--tc-line);
    border-radius: 0.7rem;
    background: var(--tc-panel);
}
.tc-theme .tc-meter-overview { border-top: 3px solid #315b81; }
.tc-theme .tc-meter-title {
    margin: 0 0 1rem;
    color: var(--tc-ink);
    font-size: 1.25rem;
    font-weight: 750;
}
.tc-theme .tc-meter-account {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.tc-theme .tc-meter-label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--tc-copy);
    font-size: 0.85rem;
}
.tc-theme .tc-meter-account-value {
    color: var(--tc-ink);
    font-weight: 650;
}
.tc-theme .tc-meter-account-value .fs11 {
    display: block;
    color: var(--tc-copy);
    font-size: 0.8rem;
    font-weight: 400;
}
.tc-theme .tc-veeam-billing .metered-reports {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr));
    gap: 0.8rem;
    margin: 0;
}
.tc-theme .tc-veeam-billing .metered-reports > .button {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.25rem;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 0.7rem 0;
    border: 0;
    border-top: 1px solid var(--tc-line);
    border-radius: 0;
    background: transparent;
    color: var(--tc-ink);
    box-shadow: none;
    text-shadow: none;
    cursor: default;
}
.tc-theme .tc-veeam-billing .metered-reports > .button.green {
    grid-column: 1 / -1;
    padding: 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: #f2f7fb;
}
.tc-theme .tc-veeam-billing .metered-reports .value {
    color: var(--tc-ink);
    font-size: 1.25rem;
    font-weight: 700;
}
.tc-theme .tc-veeam-billing .metered-reports .green .value { font-size: 2rem; }
.tc-theme .tc-veeam-billing .metered-reports .attr {
    color: var(--tc-copy);
    font-size: 0.88rem;
}
.tc-theme .tc-veeam-billing [hidden] { display: none !important; }
.tc-theme .tc-veeam-billing #pricingdetails .section-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0 0 1rem;
    background: transparent;
}
.tc-theme .tc-veeam-billing .section-bar h3 { order: -1; margin: 0; color: var(--tc-ink); font-size: 1.2rem; }
.tc-theme .tc-veeam-billing #pricingdetails .clear { display: none; }
.tc-theme .tc-veeam-billing #pricingtable { overflow-x: auto; }
.tc-theme .tc-veeam-billing #pricingtable table {
    width: 100% !important;
    min-width: 32rem;
    border-collapse: collapse;
    background: var(--tc-panel);
    color: var(--tc-ink);
}
.tc-theme .tc-veeam-billing #pricingtable thead th {
    padding: 0.8rem !important;
    border-color: var(--tc-line);
    background-color: var(--tc-tint);
    color: var(--tc-ink);
    font-weight: 700;
}
.tc-theme .tc-veeam-billing #pricingtable thead small {
    display: block;
    color: var(--tc-copy);
    font-size: 0.78rem;
}
.tc-theme .tc-veeam-billing #pricingtable tbody td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--tc-line);
    background: #fff;
    color: var(--tc-ink);
}
.tc-theme .tc-veeam-billing #pricingtable tbody tr:nth-child(even) td { background: #f3f8fc; }
.tc-theme .tc-veeam-billing #pricingtable .dataTables_empty { padding: 1.5rem 1rem; text-align: center; }
.tc-theme .tc-veeam-billing :is(.dataTables_info,.dataTables_paginate) {
    float: none;
    display: inline-block;
    margin: 0.8rem 0.4rem 0 0;
    color: var(--tc-copy);
    font-size: 0.84rem;
}
.tc-theme .tc-veeam-billing .dataTables_paginate :is(.paginate_button,.paginate_active) {
    display: inline-block;
    margin: 0.1rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--tc-line);
    border-radius: 0.3rem;
    background: #fff;
    color: var(--tc-blue) !important;
}
.tc-theme .tc-veeam-billing .dataTables_paginate .paginate_active {
    background: var(--tc-blue);
    color: #fff !important;
}
@media (max-width: 767px) {
    .tc-theme .cloud.tc-cloud-portal > :is(.cloud-top,#nav-onapp,#content-cloud) { flex-basis: 100%; width: 100%; }
    .tc-theme .section-account-service .service-details { grid-template-columns: minmax(0,1fr); }
    .tc-theme .tc-billing-review #invoice_actions { justify-content: flex-start; }
}

