/* testing.pikachuhosting.in: client area extras, loaded after site.css (views/layout/site.php).
   1. Breadcrumb row: Dashboard › ... (views/partials/breadcrumb.php)
   2. Phone fixes for the client area: no sideways page scroll at 320-414px, bigger tap targets.
   Plain CSS on purpose: edit it directly, no build step. Desktop rules are only in section 1. */

/* ---------- 1. breadcrumb (all screen sizes) ---------- */
.ts-crumbbar { display: flex; align-items: center; margin: -8px 0 14px; min-width: 0; }
.ts-crumbs-nav { flex: 1 1 auto; min-width: 0; }
.ts-crumbs { display: flex; align-items: center; flex-wrap: nowrap; list-style: none; margin: 0; padding: 0; font-size: 14px; min-width: 0; }
.ts-crumb { display: flex; align-items: center; flex: 0 0 auto; white-space: nowrap; color: var(--ts-muted); }
.ts-crumb + .ts-crumb::before { content: "\203A"; margin: 0 8px; color: #b4bac2; font-size: 16px; line-height: 1; }  /* › */
.ts-crumb a { color: var(--ts-muted); text-decoration: none; }
.ts-crumb a:hover, .ts-crumb a:focus { color: var(--ts-teal); text-decoration: underline; }
.ts-crumb a:focus-visible { outline: 2px solid var(--ts-teal); outline-offset: 2px; border-radius: 4px; }
/* the current page takes the space that is left and ends with "..." when it is too long */
.ts-crumb.is-current { flex: 0 1 auto; min-width: 0; color: #111; font-weight: 600; }
.ts-crumb.is-current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* inner pages (Manage, Billing, Support...) have no tab bar: the account button moves up to the title line, on the right */
.ts-client-bar.no-tabs { justify-content: flex-end; }
@media (min-width: 768px) {
    .ts-client-head > .container { position: relative; }
    .ts-client-bar.no-tabs { position: absolute; right: 15px; bottom: 12px; }
    .ts-client-bar.no-tabs .ts-account-btn { margin-bottom: 0; }
    .ts-client-head .container:has(.no-tabs) .ts-client-title { padding-right: 180px; overflow-wrap: anywhere; }
}

/* Billing page: "Total to pay" summary above the status filter (views/client/invoices.php) */
.ts-bill-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
    padding: 14px 18px; margin: 0 0 16px; border: 1px solid #eceef1; border-radius: 12px; background: #f9fafb; }
.ts-bill-summary.is-due { background: #fffaf0; border-color: #f3d9a4; }
.ts-bill-summary-text { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ts-bill-summary-label { color: #6b7280; font-size: 14px; font-weight: 600; }
.ts-bill-summary-value { color: #111; font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.ts-bill-summary.is-due .ts-bill-summary-value { color: #b45309; }
.ts-bill-summary-note { color: #9aa1ab; font-size: 13.5px; }
.ts-bill-summary .ts-bill-summary-btn { border-radius: 999px; padding: 6px 22px; font-weight: 600; }

/* Account Information: read-only details with an Edit button; the form shows after Edit (views/client/profile.php) */
.ts-details-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ts-details-head .ts-details-edit { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
.ts-details-view { margin-bottom: 0; }
.ts-details-view dd { overflow-wrap: anywhere; }
.ts-details-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ts-details-actions .ts-details-cancel { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; }

/* client area dropdowns (e.g. Country, State): one chevron, centred, same size as the text fields */
main.ts-client select.form-control {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    height: auto; min-height: 46px; padding: 10px 40px 10px 14px; line-height: 1.5; border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    background-size: 12px 12px;
    text-overflow: ellipsis;
}
main.ts-client select.form-control::-ms-expand { display: none; }
main.ts-client select.form-control:disabled { background-color: #f3f4f6; }

/* Nameservers on the manage pages: each name with a Copy button on the same row (copy script in client-copy.js) */
.ts-ns-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.ts-ns-row > .ts-ns-name { display: block; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: #111; font-family: SFMono-Regular, Menlo, Consolas, monospace; }
.ts-copy {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 98px; min-height: 40px; padding: 0 12px; border: 1px solid #dfe3e7; border-radius: 999px;
    background: #fff; color: #4b5563; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ts-copy:hover, .ts-copy:focus { border-color: var(--ts-teal); color: var(--ts-teal); }
.ts-copy:focus-visible { outline: 2px solid var(--ts-teal); outline-offset: 2px; }
.ts-copy.is-copied { border-color: var(--ts-teal); color: #00757a; background: #e6f5f5; }

/* Manage website / bot page: everything in one card (views/client/service.php) */
.ts-card.ts-svc, main.ts-client .ts-card.ts-svc { padding: 0; overflow: hidden; }
.ts-svc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 26px; }
.ts-svc-head-text { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ts-svc-head .ts-card-title { margin: 0; overflow-wrap: anywhere; }
.ts-svc-status .ts-badge { display: inline-block; margin: 0; vertical-align: middle; }
.ts-svc-login { margin: 0; flex: 0 0 auto; }
.ts-svc-alert { margin: 0 26px 18px; }
.ts-svc-section { border-top: 1px solid #eceef1; padding: 20px 26px 22px; }
.ts-svc-section-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ts-muted); margin: 0 0 14px; }
.ts-svc-help { margin: -4px 0 12px; }
.ts-svc-dl { margin: 0; }
.ts-svc-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 6px 0; }
.ts-svc-row dt { color: var(--ts-muted); font-weight: 500; margin: 0; }
.ts-svc-row dd { color: #111; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
/* Service details: rows on the left, a drawing on the right (views/partials/service_art.php); hidden on phones */
.ts-svc-details-body { display: flex; align-items: center; gap: 32px; }
.ts-svc-details-body .ts-svc-dl { flex: 1 1 auto; min-width: 0; }
.ts-svc-art { flex: 0 0 210px; display: flex; justify-content: center; padding-right: 8px; }
.ts-svc-art-img { width: 210px; height: auto; display: block; }
.ts-svc-features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; }
.ts-svc-features li { display: flex; align-items: center; gap: 10px; color: #111; min-width: 0; }
.ts-svc-features li span { overflow-wrap: anywhere; }
.ts-svc-features .pk-check-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.ts-svc-group + .ts-svc-group, .ts-svc-features + .ts-svc-group { margin-top: 16px; }
.ts-svc-group-title { font-weight: 600; color: #111; margin-bottom: 10px; }
.ts-svc-ns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.ts-svc-ns .ts-ns-row:last-child, .ts-svc-ns .ts-ns-row:nth-last-child(2):nth-child(odd) { margin-bottom: 0; }
@media (max-width: 991.98px) {
    .ts-svc-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Empty states: drawing + title + one line + button, when a section has nothing yet (views/partials/empty_state.php) */
.ts-empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 12px 24px; }
.ts-empty-art { width: 112px; height: 112px; margin-bottom: 14px; flex: 0 0 auto; }
.ts-empty-title { font-size: 18px; font-weight: 700; color: #111; margin: 0 0 6px; }
.ts-empty-text { color: var(--ts-muted); margin: 0 auto 16px; max-width: 360px; font-size: 15px; line-height: 1.5; }
.ts-empty-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; }
.btn.ts-empty-cta:hover, .btn.ts-empty-cta:focus { color: #fff; filter: brightness(.95); }
.ts-empty-link { display: inline-block; margin-top: 12px; color: var(--ts-teal); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.ts-empty-link:hover, .ts-empty-link:focus { color: #00757a; text-decoration: underline; }
.ts-empty-state.is-compact .ts-empty-cta { margin-top: 10px; }
.ts-empty-state.is-compact .ts-empty-link { display: block; margin-top: 8px; }
/* compact: the dashboard cards (bots, domains) and the billing filter; drawing on the left, text on the right */
.ts-empty-state.is-compact { flex-direction: row; text-align: left; gap: 14px; padding: 4px 0; }
.ts-empty-state.is-compact .ts-empty-art { width: 72px; height: 72px; margin: 0; }
.ts-empty-state.is-compact .ts-empty-title { font-size: 16px; margin-bottom: 2px; }
.ts-empty-state.is-compact .ts-empty-text { margin: 0; font-size: 14px; }

/* ---------- No green in the client area ----------
   Body class ts-client-area is set only on client pages (views/client/nav.php), so the public pages keep their colours.
   Positive states (Active, Paid, Answered, done, success messages, check icons) use the brand teal (#00979D,
   the "Log in to cPanel" / "Pay now" colour) with a light teal tint; amber and red warnings stay as they are. */
.ts-client-area {
    --tg-theme-primary: #00979D;          /* theme green used by links, focus rings and icons */
    --tg-color-green-default: #00979D;
}
.ts-client-area .badge-success,
.ts-client-area main.ts-client .badge-success,
.ts-client-area .status-active, .ts-client-area .status-paid, .ts-client-area .status-completed, .ts-client-area .status-open,
.ts-client-area .ca-badge-success { background: #e6f5f5; color: #00757a; }
.ts-client-area .text-success { color: #00757a !important; }
.ts-client-area .bg-success { background-color: var(--ts-teal) !important; }
.ts-client-area .border-success { border-color: var(--ts-teal) !important; }
.ts-client-area .btn-success { background-color: var(--ts-teal); border-color: var(--ts-teal); color: #fff; }
.ts-client-area .btn-outline-success { color: #00757a; border-color: var(--ts-teal); }
.ts-client-area .btn-outline-success:hover { background-color: var(--ts-teal); color: #fff; }
.ts-client-area .alert-success, .ts-client-area .ca-alert-success { background: #e6f5f5; border-color: #b8e2e3; color: #00646a; }
/* check icons (the green circle in TS_CHECK, lib/view.php); tick icons are set back to green #17BD54 in public-mobile.css, section 3 */
.ts-client-area .pk-check-icon circle { fill: var(--ts-teal); }
/* dashboard and notification icons, the website dot, "Active" chips */
.ts-client-area .ts-note-icon.k-payment,
.ts-client-area .ts-dash-stat.is-ok .ts-dash-icon { background: #e6f5f5; color: var(--ts-teal); }
.ts-client-area .ts-site-badge { background: var(--ts-teal); }
.ts-client-area .ts-site-state { background: #e6f5f5; color: #00757a; }
/* billing list: paid invoices */
.ts-client-area .ts-bills li.is-paid .ts-bill-icon,
.ts-client-area .ts-bills li.is-paid .ts-bill-state { background: #e6f5f5; color: #00757a; }
.ts-client-area .ts-bills li.is-paid .ts-bill-badge { background: var(--ts-teal); }
/* invoice page: coupon applied, discount line; account: strong password bar; on/off switch */
.ts-client-area .ts-coupon-result.ok { background: #e6f5f5; color: #00757a; }
.ts-client-area .ts-discount td { color: #00757a; }
.ts-client-area .ts-strength-bar span.strong { background: var(--ts-teal); }
.ts-client-area .ts-switch input:checked + .ts-switch-ui .ts-on { background: var(--ts-teal); }

/* ---------- 2. phones and small tablets ---------- */
@media (max-width: 767.98px) {
    /* breadcrumb: the account icon sits top-right on phones (site.css), so keep the row clear of it.
       "Dashboard" always shows; middle crumbs (e.g. "My Websites") and the current page shrink with "..." */
    .ts-crumbbar { margin: -4px 0 12px; padding-right: 64px; min-height: 40px; }
    .ts-crumbs { font-size: 13px; }
    .ts-crumb + .ts-crumb::before { margin: 0 6px; }
    .ts-crumb a { display: inline-flex; align-items: center; min-height: 40px; }   /* bigger tap area */
    .ts-crumb:not(.is-current):not(:first-child) { flex: 0 1 auto; min-width: 4.5em; overflow: hidden; }
    .ts-crumb:not(.is-current):not(:first-child) a { display: block; line-height: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ts-crumb.is-current { min-width: 4em; flex-shrink: 4; }   /* the current page is already the big title below, so it gives up space first */

    /* the page title (often a long domain name) wraps instead of pushing the page wider */
    .ts-client-title { overflow-wrap: anywhere; line-height: 1.25; }
    /* no tab bar on inner pages: the account button sits on the breadcrumb line (absolute, site.css), so the empty bar takes no room */
    .ts-client-bar.no-tabs { padding-bottom: 4px; }

    /* client tabs: full-height tap targets; they already scroll sideways (site.css) */
    .ts-client-bar .ts-client-nav a { min-height: 44px; display: inline-flex; align-items: center; padding-top: 8px; padding-bottom: 10px; }
    .ts-account-btn { min-height: 40px; }
    .ts-account-menu .dropdown-item { padding-top: 11px; padding-bottom: 11px; }

    /* long emails, domains and descriptions break instead of overflowing */
    .ts-client .ts-alert, .ts-client-head + .container .ts-alert,
    .ts-client .ts-dl dd, .ts-client .ts-card-title, .ts-client .ts-muted,
    .ts-client .ts-site-name, .ts-client .ts-list a span, .ts-client .ts-msg-body,
    .ts-client .ts-note-text, .ts-client .ts-table td { overflow-wrap: anywhere; min-width: 0; }
    .ts-client-head + .container .ts-alert { font-size: 14px; }

    /* cards and rows: nothing may be wider than the screen */
    main.ts-client .row > [class*="col-"] { min-width: 0; }
    main.ts-client .ts-card { max-width: 100%; }
    main.ts-client img, main.ts-client table { max-width: 100%; }
    .ts-client .ts-dash-list li a { gap: 10px; }
    /* status badges in lists ("Waiting for payment"): keep their size and wrap their own text if needed */
    .ts-client .ts-list li a > span:first-child { flex: 1 1 auto; }
    .ts-client .ts-list li a > .ts-badge { flex: 0 0 auto; max-width: 48%; white-space: normal; text-align: center; line-height: 1.25; }

    /* buttons: comfortable to tap */
    main.ts-client .btn.ts-btn-sm, main.ts-client .btn.ts-btn-sm-outline, main.ts-client .btn.ts-site-manage { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
    main.ts-client .ts-btn, main.ts-client .tg-btn { min-height: 46px; }
    .ts-bill-filter button { min-height: 38px; padding: 6px 14px; }
    .ts-bill-actions .btn { min-height: 40px; }
    /* Account: Save and Cancel full width, one under the other */
    .ts-details-actions .ts-btn, .ts-details-actions .ts-details-cancel { width: 100%; justify-content: center; }
    .ts-details-head .ts-details-edit { min-height: 40px; padding: 0 16px; }
    /* Manage page card: tighter padding, login button full width, label/value kept in a tight 2 columns */
    .ts-svc-head { padding: 18px 16px; }
    .ts-svc-login, .ts-svc-login .ts-btn { width: 100%; justify-content: center; }
    .ts-svc-alert { margin: 0 16px 16px; }
    .ts-svc-section { padding: 16px 16px 18px; }
    .ts-svc-art { display: none; }   /* phones: keep the details readable */
    .ts-svc-row { grid-template-columns: 132px minmax(0, 1fr); gap: 10px; padding: 5px 0; }
    .ts-svc-features { grid-template-columns: 1fr; gap: 9px; }
    .ts-svc-ns { grid-template-columns: 1fr; }
    .ts-svc-ns .ts-ns-row:nth-last-child(2):nth-child(odd) { margin-bottom: 8px; }
    /* Empty states: a bit smaller, button full width */
    .ts-empty-state { padding: 20px 4px 16px; }
    .ts-empty-art { width: 96px; height: 96px; }
    .ts-empty-state:not(.is-compact) .ts-empty-cta { width: 100%; max-width: 320px; }
    /* Billing summary: amount on top, full-width Pay now button below */
    .ts-bill-summary { padding: 14px 16px; }
    .ts-bill-summary .ts-bill-summary-btn { width: 100%; min-height: 44px; font-size: 15px; }

    /* invoice page: the header and the totals stack on the left */
    .ts-invoice > .d-flex > .text-right { text-align: left !important; margin-top: 12px; width: 100%; }
}

@media (max-width: 575.98px) {
    /* the info lists (Status, Domain, Billing...) are one column here (site.css); add a little space between items */
    .ts-client .ts-dl dt { margin-top: 4px; font-size: 13px; }
    main.ts-client .ts-card-title { font-size: 19px; }
    .ts-client-title { font-size: 22px; }
}

/* ---------- Invoice page (views/client/invoice.php) ----------
   Minimal on purpose: the PDF has the full details. Header (number + status + Download Invoice),
   plan and cycle, connected domain, amount, dates, then the payment box while unpaid (apply-coupon form removed; applied discount still shown). */
.ts-inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.ts-inv-title { display: flex; align-items: center; gap: 10px; }
.ts-inv-no { margin: 0; font-size: 22px; font-weight: 700; color: #111; }
.ts-inv-title .ts-badge { font-size: 12.5px; padding: 5px 10px; }
.ts-inv-download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; font-weight: 600; }
.ts-inv-plan { margin-top: 22px; padding-top: 20px; border-top: 1px solid #eceef1; }
.ts-inv-plan-name { font-size: 19px; font-weight: 700; color: #111; line-height: 1.35; }
.ts-inv-plan-meta { margin-top: 2px; color: var(--ts-muted); font-weight: 500; }
.ts-inv-dl { margin: 16px 0 0; }
.ts-inv-row { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid #f1f3f5; }
.ts-inv-row:first-child { border-top: 0; }
.ts-inv-row dt { flex: 0 0 150px; margin: 0; color: var(--ts-muted); font-weight: 500; }
.ts-inv-row dd { flex: 1 1 auto; min-width: 0; margin: 0; color: #111; font-weight: 600; overflow-wrap: anywhere; }
.ts-inv-row dd a { color: var(--ts-teal); }
.ts-inv-amount { font-size: 26px; font-weight: 700; color: #111; line-height: 1.1; }
.ts-inv-was { margin-left: 8px; color: var(--ts-muted); font-weight: 500; }
.ts-inv-discount { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: #e6f5f5; color: #00757a; font-weight: 600; }
.ts-inv-discount i { margin-right: 6px; }
.ts-inv-pay { margin-top: 18px; padding-top: 18px; border-top: 1px solid #eceef1; }
.ts-inv-payform { text-align: left; }
.ts-inv-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: #f4f7f9; border: 1px solid #e3e8ec; color: #374151; font-size: 14.5px; line-height: 1.5; }
.ts-inv-notice i { color: var(--ts-teal); margin-top: 3px; }
.ts-inv-notice a { color: var(--ts-teal); font-weight: 600; }
@media (max-width: 575.98px) {
    .ts-inv-download { width: 100%; }
    .ts-inv-no { font-size: 20px; }
    .ts-inv-row dt { flex-basis: 138px; }
    .ts-inv-row { gap: 10px; }
    .ts-inv-amount { font-size: 23px; }
    .ts-inv-payform .ts-btn { width: 100%; }
}

/* ---------- Dashboard section titles are links ----------
   "My Websites ›", "My Bots ›" and "Domains ›" open their list pages (they replace the old "View all" links);
   the buy buttons read "Buy new … +". */
.ts-title-link, .ts-card a.ts-title-link:not(.btn), .ts-card-title a.ts-title-link, .ts-section-title a.ts-title-link { display: inline-flex; align-items: center; gap: 8px; color: #111; text-decoration: none; border-radius: 6px; }
.ts-title-link:hover, .ts-card a.ts-title-link:not(.btn):hover, .ts-title-link:focus, .ts-card-title a.ts-title-link:hover, .ts-section-title a.ts-title-link:hover { color: var(--ts-teal); text-decoration: none; }
.ts-title-link:focus-visible { outline: 2px solid var(--ts-teal); outline-offset: 3px; }
.ts-title-chev { flex: 0 0 auto; margin-left: -2px; color: #9aa3ad; transition: transform .2s ease, color .2s ease; }
.ts-title-link:hover .ts-title-chev, .ts-title-link:focus .ts-title-chev { color: var(--ts-teal); transform: translateX(3px); }
.ts-plus { display: inline-block; margin-left: 4px; font-weight: 700; font-size: 1.15em; line-height: 1; }
.ts-buy-btn { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ts-title-chev { transition: none; } }
.ts-title-link i { margin-right: 0 !important; }

/* ---------- Account button stays black ----------
   Avatar, name and chevron are #111 with a neutral grey border in every state (no teal on hover / focus / open).
   Keyboard focus gets a dark grey ring. */
.ts-client-bar .ts-account .ts-account-btn,
.ts-client-bar .ts-account .ts-account-btn:hover,
.ts-client-bar .ts-account .ts-account-btn:focus,
.ts-client-bar .ts-account .ts-account-btn:active,
.ts-client-bar .ts-account .ts-account-btn.active,
.ts-client-bar .ts-account .ts-account-btn[aria-expanded="true"],
.ts-client-bar .ts-account.show .ts-account-btn {
    color: #111; background: #fff; border-color: #d1d5db; box-shadow: none; outline: none;
}
.ts-client-bar .ts-account .ts-account-btn:hover,
.ts-client-bar .ts-account .ts-account-btn[aria-expanded="true"],
.ts-client-bar .ts-account.show .ts-account-btn { border-color: #111; }
.ts-client-bar .ts-account .ts-account-btn > .fa-user-circle,
.ts-client-bar .ts-account .ts-account-btn .ts-account-name,
.ts-client-bar .ts-account .ts-account-btn .ts-account-caret,
.ts-client-bar .ts-account .ts-account-btn:hover .ts-account-caret,
.ts-client-bar .ts-account.show .ts-account-btn .ts-account-caret { color: #111; }
.ts-client-bar .ts-account .ts-account-btn:focus-visible { outline: 2px solid #4b5563; outline-offset: 2px; }

/* ---------- Security page (views/client/security.php) ---------- */
.ts-sec + .ts-sec { margin-top: 20px; }
.ts-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.ts-sec-head .ts-card-title { display: flex; align-items: center; gap: 10px; }
.ts-sec-btn { white-space: nowrap; }
.ts-sess { list-style: none; margin: 0; padding: 0; }
.ts-sess-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #eceef1; }
.ts-sess-row:first-child { border-top: 0; }
.ts-sess-icon { flex: 0 0 42px; height: 42px; border-radius: 12px; background: #f3f4f6; color: #1f2937; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.ts-sess-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ts-sess-name { font-weight: 600; color: #111; }
.ts-sess-me { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #e6f5f5; color: #00757a; font-size: 12px; font-weight: 600; vertical-align: 1px; }
.ts-sess-meta { color: var(--ts-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.ts-sess-action { flex: 0 0 auto; }
.ts-sec-ok { color: var(--ts-teal); margin-right: 4px; }
.ts-sec-label { display: block; font-weight: 600; color: #111; margin-bottom: 6px; font-size: 14.5px; }
.ts-sec-proof-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ts-sec-proof-row .form-control { flex: 1 1 200px; max-width: 280px; min-height: 42px; }
.ts-sec-proof-row .btn { min-height: 42px; }
.btn.ts-btn-danger-outline { border: 1px solid #f1c4c0; color: #c0392b; background: #fff; border-radius: 999px; font-weight: 600; padding: 7px 18px; }
.btn.ts-btn-danger-outline:hover { background: #fdecec; color: #a93226; }
.ts-sec-setup { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.ts-sec-steps { flex: 1 1 260px; margin: 0; padding-left: 20px; line-height: 1.7; }
.ts-sec-key { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #f3f4f6; color: #111; font-size: 14px; letter-spacing: .04em; word-break: break-all; }
.ts-qr { flex: 0 0 180px; width: 180px; height: 180px; padding: 6px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ts-qr svg { display: block; width: 100%; height: 100%; }
.ts-sec-codes { margin-bottom: 16px; padding: 14px 16px; border-radius: 12px; background: #f8fafb; border: 1px solid #e3e8ec; }
.ts-codes { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ts-codes code { display: block; text-align: center; padding: 6px 4px; border-radius: 8px; background: #fff; border: 1px solid #e5e7eb; color: #111; font-size: 14px; }
@media (max-width: 575.98px) {
    .ts-sec-btn { width: 100%; }
    .ts-sec-head > form { width: 100%; }
    .ts-sess-row { flex-wrap: wrap; }
    .ts-sess-action { margin-left: 56px; }
    .ts-codes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-qr { margin: 0 auto; }
    .ts-sec-proof-row .form-control { max-width: none; flex-basis: 100%; }
}


/* fix20261028: on phones, services (websites/bots/domains) before Support/Invoices */
@media (max-width: 767.98px) {
  .ts-dashboard > .container {
    display: flex;
    flex-direction: column;
  }
  .ts-dashboard .ts-dash-services { order: 1; }
  .ts-dashboard .ts-dash-alerts { order: 2; }
}

/* fix20261028: phones with an unpaid invoice: the Invoices card comes first (something to do), Support stays last */
@media (max-width: 767.98px) {
  .ts-dashboard .ts-dash-alerts.has-unpaid { display: contents; }
  .ts-dashboard .ts-dash-alerts.has-unpaid > .ts-dash-col-inv { order: 0; padding: 0; }
  .ts-dashboard .ts-dash-alerts.has-unpaid > .ts-dash-col-support { order: 2; padding: 0; }
}

/* ---------- Upgrade plan (views/client/upgrade.php) and its button on the manage page ---------- */
/* sits next to the login buttons (.ts-svc-logins is a wrapping flex row, loading.css) */
/* Header buttons (Log in to cPanel / Bot Panel, Upgrade plan): same height, padding and font, side by side on the right */
main.ts-client .ts-svc-logins { gap: 10px; margin-left: auto; }   /* stays on the right, also when it wraps under the title */
main.ts-client .ts-svc-logins .tg-btn,
main.ts-client .ts-svc-logins .btn.ts-svc-upgrade {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-sizing: border-box; height: 46px; min-height: 46px; padding: 0 22px; margin: 0;
    border: 1px solid transparent; border-radius: 999px;
    font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle;
}
main.ts-client .ts-svc-logins .tg-btn i,
main.ts-client .ts-svc-logins .btn.ts-svc-upgrade i { font-size: 14px; line-height: 1; margin: 0; }
/* the upgrade button is the outline version of the same button */
main.ts-client .ts-svc-logins .btn.ts-svc-upgrade { border-color: var(--ts-teal); background: #fff; color: var(--ts-teal); }
main.ts-client .ts-svc-logins .btn.ts-svc-upgrade:hover,
main.ts-client .ts-svc-logins .btn.ts-svc-upgrade:focus { background: #e6f5f5; color: #00757a; }
@media (max-width: 575.98px) {
    /* phones: one full-width button per row */
    main.ts-client .ts-svc-logins { width: 100%; flex-direction: column; align-items: stretch; }
    main.ts-client .ts-svc-logins .ts-svc-login,
    main.ts-client .ts-svc-logins .tg-btn,
    main.ts-client .ts-svc-logins .btn.ts-svc-upgrade { width: 100%; }
}
.ts-upg-now .ts-svc-section { border-top: 1px solid #eceef1; }
/* higher plans side by side on desktop, one per row on phones */
.ts-upg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 18px; }
/* one higher plan only (e.g. bot Basic -> Standard): keep the card at a readable width */
.ts-upg-grid.is-single { grid-template-columns: minmax(0, 560px); }
.ts-upg-grid .ts-card.ts-upg-plan, main.ts-client .ts-upg-grid .ts-card.ts-upg-plan { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.ts-upg-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-upg-plan-head .ts-card-title { margin: 0; }
.ts-upg-badge { flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #e6f5f5; color: #00757a; }
.ts-upg-desc { margin: 4px 0 12px; font-size: 14.5px; }
.ts-upg-price { font-size: 26px; font-weight: 700; color: #111; margin-bottom: 14px; }
.ts-upg-price span { font-size: 15px; font-weight: 500; color: var(--ts-muted); }
.ts-upg-features { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; }
.ts-upg-features li { display: flex; align-items: center; gap: 10px; color: #4b5563; min-width: 0; }
.ts-upg-features li span { overflow-wrap: anywhere; }
.ts-upg-features li.is-new { color: #111; font-weight: 600; }
.ts-upg-features .pk-check-icon { flex: 0 0 18px; width: 18px; height: 18px; }
/* the pay box sits at the bottom of each card, so the buttons line up */
.ts-upg-pay { margin-top: auto; border-top: 1px solid #eceef1; padding-top: 14px; }
.ts-upg-pay-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 600; color: #111; }
.ts-upg-pay-row strong { font-size: 22px; }
.ts-upg-pay-note { margin: 2px 0 12px; font-size: 13.5px; }
.ts-upg-btn { width: 100%; justify-content: center; }
.ts-upg-help { font-size: 14px; margin: 0 0 24px; }
.ts-upg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ts-upg-actions form { margin: 0; }
.ts-upg-actions .btn.ts-btn-sm-outline { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; }
@media (max-width: 575.98px) {
    .ts-upg-actions > *, .ts-upg-actions .ts-btn, .ts-upg-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Resources Usage on the manage page (views/partials/usage_rings.php) ---------- */
/* sits on the right of the service details, below them on phones and small tablets.
   (.ts-uring, not .ts-ring: loading.css already uses .ts-ring for the payment spinner) */
.ts-usage { flex: 0 0 auto; width: 320px; border: 1px solid #eceef1; border-radius: 14px; padding: 16px 18px; background: #fafbfc; }
.ts-usage-title { font-size: 14px; font-weight: 700; color: #111; margin-bottom: 14px; }
.ts-usage-rings { display: flex; justify-content: space-around; gap: 16px; }
.ts-usage-item { flex: 1 1 0; min-width: 0; text-align: center; }
.ts-uring { position: relative; width: 96px; height: 96px; margin: 0 auto 8px; }
.ts-uring svg { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.ts-uring-track { fill: none; stroke: #e6eaee; stroke-width: 9; }
.ts-uring-fill { fill: none; stroke: var(--ts-teal); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ts-usage-item.is-warn .ts-uring-fill { stroke: #f59e0b; }     /* above 80% */
.ts-usage-item.is-danger .ts-uring-fill { stroke: #dc2626; }   /* above 95% */
.ts-usage-item.is-none .ts-uring-fill { stroke: transparent; } /* no data */
.ts-uring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #111; }
.ts-uring-center.is-small { font-size: 12px; font-weight: 600; color: #4b5563; }
.ts-usage-label { font-size: 14px; font-weight: 600; color: #111; }
.ts-usage-text { font-size: 13px; color: var(--ts-muted); overflow-wrap: anywhere; }
.ts-usage-note { margin-top: 12px; font-size: 12px; color: var(--ts-muted); text-align: center; }
.ts-usage.is-loading .ts-uring-track { animation: ts-usage-pulse 1.2s ease-in-out infinite; }
@keyframes ts-usage-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
    .ts-usage.is-loading .ts-uring-track { animation: none; }
    .ts-uring-fill { transition: none; }
}
@media (max-width: 991.98px) {
    .ts-usage { width: 290px; padding: 14px; }
    .ts-uring { width: 84px; height: 84px; }
}
@media (max-width: 767.98px) {
    .ts-svc-details-body { flex-direction: column; align-items: stretch; gap: 18px; }
    .ts-usage { width: 100%; }
}

/* ---------- Account balance on /account (views/client/profile.php) ---------- */
/* balance and "Add funds" on one line; the button goes below the amount on phones */
.ts-wal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ts-wal-amount { font-size: 32px; font-weight: 700; color: #111; line-height: 1.2; }
.ts-wal-amount span { font-size: 15px; font-weight: 600; color: var(--ts-muted); }
.ts-wal-add[hidden] { display: none !important; }
.ts-wal-add i { margin-right: 6px; }
.ts-wal-note { font-size: 14.5px; margin: 8px 0 0; }
/* Add funds form */
.ts-wal-topup { margin-top: 16px; padding: 16px; border: 1px solid #eceef1; border-radius: 12px; background: #fafbfc; }
.ts-wal-topup label { font-weight: 600; color: #111; margin-bottom: 8px; display: block; }
.ts-wal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ts-wal-chip { border: 1px solid #d7dbe0; background: #fff; color: #111; border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.ts-wal-chip:hover, .ts-wal-chip.is-on { border-color: var(--ts-teal); color: var(--ts-teal); background: #e6f5f5; }
.ts-wal-input { position: relative; max-width: 240px; }
.ts-wal-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ts-muted); font-weight: 600; }
.ts-wal-input .form-control { padding-left: 28px; }
.ts-wal-limit { font-size: 13.5px; margin: 6px 0 12px; }
.ts-wal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ts-wal-actions .btn.ts-btn-sm-outline { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; }
/* last 10 balance changes */
.ts-wal-sub { font-size: 16px; font-weight: 700; color: #111; margin: 22px 0 6px; }
.ts-wal-list { list-style: none; margin: 0; padding: 0; }
.ts-wal-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f0f1f3; }
.ts-wal-list li:first-child { border-top: 0; }
.ts-wal-ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.ts-wal-ico.is-in { background: #e6f5f5; color: var(--ts-teal); }
.ts-wal-ico.is-out { background: #f3f4f6; color: #4b5563; }
.ts-wal-what { flex: 1 1 auto; min-width: 0; color: #111; font-weight: 600; font-size: 14.5px; }
.ts-wal-what a { color: #111; }
.ts-wal-what small, .ts-wal-sum small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ts-muted); overflow-wrap: anywhere; }
.ts-wal-sum { flex: 0 0 auto; text-align: right; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.ts-wal-sum.is-in { color: var(--ts-teal); }
.ts-wal-sum.is-out { color: #111; }
/* auto-renew switches */
.ts-wal-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; margin: 0; border-top: 1px solid #f0f1f3; cursor: pointer; position: relative; }
.ts-wal-toggle:first-of-type { border-top: 0; }
.ts-wal-toggle-text { font-weight: 600; color: #111; }
.ts-wal-toggle-text i { width: 20px; color: var(--ts-teal); margin-right: 6px; text-align: center; }
.ts-wal-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ts-wal-toggle-ui { flex: 0 0 44px; width: 44px; height: 24px; border-radius: 999px; background: #d7dbe0; position: relative; transition: background .15s; }
.ts-wal-toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.ts-wal-toggle input:checked + .ts-wal-toggle-ui { background: var(--ts-teal); }
.ts-wal-toggle input:checked + .ts-wal-toggle-ui::after { left: 23px; }
.ts-wal-toggle input:focus-visible + .ts-wal-toggle-ui { outline: 2px solid var(--ts-teal); outline-offset: 2px; }
@media (max-width: 575.98px) {
    .ts-wal-amount { font-size: 28px; }
    .ts-wal-add, .ts-wal-actions > *, .ts-wal-prefs .ts-btn { width: 100%; justify-content: center; text-align: center; }
    .ts-wal-input { max-width: none; }
}

/* ---------- Payment methods on an unpaid invoice (views/client/invoice.php) ---------- */
/* Account balance and Cashfree side by side on desktop, one below the other on phones */
.ts-inv-pay.has-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ts-paym { border: 1px solid #eceef1; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ts-paym .ts-btn, .ts-paym .ts-paym-off { width: 100%; justify-content: center; margin-top: auto; }
.ts-paym .ts-muted { font-size: 13.5px; margin-top: 0 !important; }
.ts-paym-bal { border-color: var(--ts-teal); background: #f5fbfb; }
.ts-paym-bal.is-low { border-color: #eceef1; background: #fafbfc; }
.ts-paym-head { display: flex; align-items: center; gap: 12px; }
.ts-paym-head strong { display: block; color: #111; font-size: 15px; }
.ts-paym-head small { display: block; color: var(--ts-muted); font-size: 13px; }
.ts-paym-ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #e6f5f5; color: var(--ts-teal); display: inline-flex; align-items: center; justify-content: center; }
.ts-paym-off { min-height: 44px; opacity: .55; cursor: not-allowed; }
.ts-paym-low { font-size: 13.5px; color: #92400e; }
.ts-paym-low a { color: var(--ts-teal); font-weight: 600; }

/* cPanel credentials block on the manage website page (views/client/service.php, assets/client-cpanel.js) */
.ts-cpc-msg { margin: 0 0 14px; }
.ts-cpc-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ts-cpc-user > .ts-ns-name { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; color: #111; font-family: SFMono-Regular, Menlo, Consolas, monospace; }
.ts-cpc-open, main.ts-client .ts-cpc-open { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 40px; padding: 0 14px; white-space: nowrap; }
.ts-cpc-form { max-width: 420px; margin-top: 14px; padding: 16px; border: 1px solid #eceef1; border-radius: 12px; background: #f9fafb; }
.ts-cpc-form[hidden] { display: none; }
.ts-cpc-form label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ts-cpc-pass { position: relative; }
.ts-cpc-pass .form-control { padding-right: 48px; }
.ts-cpc-eye {
    position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; background: transparent; color: #6b7280; cursor: pointer; border-radius: 8px;
}
.ts-cpc-eye:hover, .ts-cpc-eye:focus { color: var(--ts-teal); }
.ts-cpc-eye:focus-visible { outline: 2px solid var(--ts-teal); outline-offset: 1px; }
.ts-cpc-rule { font-size: 13px; margin: -4px 0 14px; }
.ts-cpc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 575px) {
    .ts-cpc-form { max-width: none; padding: 14px; }
    .ts-cpc-actions > * { flex: 1 1 auto; }
}
