/* QCoreT Cloud theme — client area: services list, service detail, invoices. Scoped to html.qx. */

/* page heading */
html.qx .qx-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; margin: 4px 0 22px; }
html.qx .qx-pagehead h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 800; color: var(--qx-navy); margin: 0 0 .3rem; letter-spacing: -.02em; }
html.qx .qx-pagehead p { margin: 0; color: var(--qx-ink-2); max-width: 640px; }
html.qx .qx-pagehead .btn { display: inline-flex; align-items: center; gap: .45rem; }

/* tones per kind of service */
html.qx .qx-svc--domain   { --t: #0a8fb5; --tb: #e3f6fc; }
html.qx .qx-svc--site     { --t: #0a46b4; --tb: #e4ecfa; }
html.qx .qx-svc--mail     { --t: #4b3fd1; --tb: #ecebfd; }
html.qx .qx-svc--send     { --t: #7a3fd1; --tb: #f1eafd; }
html.qx .qx-svc--sparkles { --t: #c2337a; --tb: #fceaf3; }
html.qx .qx-svc--shield   { --t: #0f9d63; --tb: #e5f7ef; }
html.qx .qx-svc--server   { --t: #032C6A; --tb: #e6ecf6; }
html.qx .qx-svc--suite, html.qx .qx-svc--headset, html.qx .qx-svc--layers { --t: #33435e; --tb: #eef2f8; }

/* services list */
html.qx .qx-svcs__title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 800; color: var(--qx-navy); text-transform: uppercase; letter-spacing: .08em; margin: 26px 0 12px; }
html.qx .qx-svcs__title span { font: 600 .78rem var(--qx-mono); color: var(--qx-steel); background: #fff; border: 1px solid var(--qx-line); border-radius: 999px; padding: .05rem .55rem; }
html.qx .qx-svcs { display: grid; gap: 12px; margin-bottom: 18px; }
html.qx .qx-svcs--flat { padding: 14px; margin: 0; }
html.qx .qx-svc { display: grid; grid-template-columns: 52px minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.15fr) auto auto; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--qx-line); box-shadow: var(--qx-sh-1); color: var(--qx-ink); text-decoration: none; position: relative; overflow: hidden; transition: transform .3s var(--qx-ease-out), box-shadow .3s, border-color .3s; }
html.qx .qx-svc::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--t, var(--qx-royal)); opacity: .85; }
html.qx .qx-svc:hover { transform: translateY(-2px); box-shadow: var(--qx-sh-2); border-color: rgba(10, 70, 180, .3); color: var(--qx-ink); }
html.qx .qx-svc.is-muted { opacity: .62; }
html.qx .qx-svc.is-muted::before { background: var(--qx-steel); }
html.qx .qx-svc__ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: var(--t, var(--qx-royal)); background: var(--tb, #e4ecfa); }
html.qx .qx-svc__ico .qx-ico { width: 24px; height: 24px; }
html.qx .qx-svc__ico--lg { width: 64px; height: 64px; border-radius: 18px; }
html.qx .qx-svc__ico--lg .qx-ico { width: 30px; height: 30px; }
html.qx .qx-svc__main { display: flex; flex-direction: column; min-width: 0; }
html.qx .qx-svc__title { font-weight: 700; color: var(--qx-navy); font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.qx .qx-svc__meta { font-size: .82rem; color: var(--qx-steel); }
html.qx .qx-svc__price { display: flex; align-items: baseline; gap: .25rem; white-space: nowrap; }
html.qx .qx-svc__price b { font: 600 1.05rem var(--qx-mono); color: var(--qx-navy); }
html.qx .qx-svc__price b.is-free { font-family: var(--qx-font); font-weight: 700; color: var(--qx-ok); font-size: .95rem; }
html.qx .qx-svc__price small { color: var(--qx-steel); font-size: .8rem; }
html.qx .qx-svc__due { display: flex; flex-direction: column; line-height: 1.25; }
html.qx .qx-svc__due small { font-size: .72rem; color: var(--qx-steel); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
html.qx .qx-svc__due b { font-weight: 600; color: var(--qx-ink); font-size: .93rem; }
html.qx .qx-svc__due em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--qx-warn); }
html.qx .qx-svc__due.is-soon b { color: var(--qx-warn); }
html.qx .qx-svc__go { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .88rem; color: var(--qx-royal-2); padding: .5rem .8rem; border-radius: 11px; border: 1px solid var(--qx-line-2); background: var(--qx-paper); transition: background .25s, color .25s, border-color .25s; white-space: nowrap; }
html.qx .qx-svc__go .qx-ico { width: 16px; height: 16px; }
html.qx .qx-svc:hover .qx-svc__go { background: var(--qx-royal); border-color: var(--qx-royal); color: #fff; }

/* service detail hero */
html.qx .qx-svchero { position: relative; padding: 24px 26px 22px; margin-bottom: 22px; border-radius: 24px; background: #fff; border: 1px solid var(--qx-line); box-shadow: var(--qx-sh-1); overflow: hidden; }
html.qx .qx-svchero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--t, var(--qx-royal)), var(--qx-cyan)); }
html.qx .qx-svchero__top { display: flex; align-items: center; gap: 16px; }
html.qx .qx-svchero__name { flex: 1; min-width: 0; }
html.qx .qx-svchero__kind { font-size: .78rem; font-weight: 700; color: var(--t, var(--qx-royal-2)); text-transform: uppercase; letter-spacing: .08em; }
html.qx .qx-svchero h1 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 800; color: var(--qx-navy); margin: .15rem 0 0; letter-spacing: -.015em; overflow-wrap: anywhere; }
html.qx .qx-svchero__status .badge { font-size: .85rem; padding: .5em .9em; }
html.qx .qx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
html.qx .qx-facts > div { padding: 14px 16px; border-radius: 15px; background: var(--qx-paper); border: 1px solid var(--qx-line); }
html.qx .qx-facts dt { font-size: .72rem; font-weight: 700; color: var(--qx-steel); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .25rem; }
html.qx .qx-facts dd { margin: 0; font-weight: 700; color: var(--qx-navy); font-size: 1.05rem; display: flex; flex-direction: column; }
html.qx .qx-facts dd small { font-weight: 600; font-size: .8rem; color: var(--qx-steel); }
html.qx .qx-svchero__tickets { display: inline-flex; align-items: center; gap: .45rem; margin-top: 14px; padding: .55rem .9rem; border-radius: 12px; background: var(--qx-info-bg); color: var(--qx-info); font-weight: 700; font-size: .9rem; text-decoration: none; }
html.qx .qx-svchero__tickets .qx-ico { width: 17px; height: 17px; }
html.qx .qx-svchero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--qx-line-2); }
html.qx .qx-svchero__actions .btn { display: inline-flex; align-items: center; gap: .45rem; }
html.qx .qx-svchero__actions .btn .qx-ico { width: 17px; height: 17px; }
html.qx .qx-btn-quiet { margin-left: auto; color: var(--qx-steel); background: transparent; border: 0; font-weight: 600; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
html.qx .qx-btn-quiet:hover { color: var(--qx-bad); background: transparent; }

/* invoices */
html.qx .qx-duebar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 18px; border-radius: 20px; color: rgba(255, 255, 255, .8); background: linear-gradient(135deg, var(--qx-night-3), var(--qx-night) 70%); box-shadow: 0 24px 50px -30px rgba(1, 51, 136, .9); }
html.qx .qx-duebar__ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--qx-cyan); background: rgba(98, 228, 255, .12); border: 1px solid rgba(98, 228, 255, .25); }
html.qx .qx-duebar__txt { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
html.qx .qx-duebar__txt b { color: #fff; font-size: 1.08rem; }
html.qx .qx-duebar__txt strong { color: var(--qx-cyan); font-family: var(--qx-mono); }
html.qx .qx-duebar .btn { display: inline-flex; align-items: center; gap: .4rem; }
html.qx .qx-invcard { overflow: hidden; }
html.qx .qx-invtabs { display: flex; gap: 6px; padding: 12px 14px 0; border-bottom: 1px solid var(--qx-line); }
html.qx .qx-invtabs .nav-link { border: 0; background: transparent; padding: .75rem 1rem; font-weight: 700; color: var(--qx-ink-2); border-bottom: 3px solid transparent; border-radius: 0; display: inline-flex; align-items: center; gap: .45rem; }
html.qx .qx-invtabs .nav-link.active { color: var(--qx-navy); border-bottom-color: var(--qx-royal-2); }
html.qx .qx-count { font: 600 .72rem var(--qx-mono); padding: .1rem .5rem; border-radius: 999px; background: #eef2f8; color: var(--qx-ink-2); }
html.qx .qx-count--bad { background: var(--qx-bad-bg); color: var(--qx-bad); }
html.qx .qx-invs { display: flex; flex-direction: column; padding: 6px 14px 14px; }
html.qx .qx-inv { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .8fr) 92px; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 14px; color: var(--qx-ink); text-decoration: none; border-bottom: 1px solid var(--qx-line); transition: background .2s; }
html.qx a.qx-inv:hover { background: var(--qx-paper); color: var(--qx-ink); }
html.qx .qx-inv--head { padding-top: 10px; padding-bottom: 8px; font-size: .72rem; font-weight: 700; color: var(--qx-steel); text-transform: uppercase; letter-spacing: .07em; }
html.qx .qx-inv__no { display: flex; align-items: center; gap: .75rem; }
html.qx .qx-inv__no b { display: block; font-family: var(--qx-mono); font-weight: 600; color: var(--qx-navy); }
html.qx .qx-inv__no small { font-size: .78rem; color: var(--qx-steel); }
html.qx .qx-inv__ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--qx-warn); background: var(--qx-warn-bg); flex: none; }
html.qx .qx-inv__ico.is-paid { color: var(--qx-ok); background: var(--qx-ok-bg); }
html.qx .qx-inv__ico .qx-ico { width: 18px; height: 18px; }
html.qx .qx-inv__cell { display: flex; flex-direction: column; font-size: .93rem; }
html.qx .qx-inv__cell em { font-style: normal; font-size: .78rem; color: var(--qx-steel); font-weight: 600; }
html.qx .qx-inv__cell.is-bad, html.qx .qx-inv__cell.is-bad em { color: var(--qx-bad); }
html.qx .qx-inv__total { font: 600 1rem var(--qx-mono); color: var(--qx-navy); }
html.qx .qx-inv__act { text-align: right; }

@media (max-width: 1199.98px) {
    html.qx .qx-svc { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "ico main status" "ico price due" "ico go go"; row-gap: 8px; }
    html.qx .qx-svc__ico { grid-area: ico; align-self: start; }
    html.qx .qx-svc__main { grid-area: main; }
    html.qx .qx-svc__status { grid-area: status; justify-self: end; }
    html.qx .qx-svc__price { grid-area: price; }
    html.qx .qx-svc__due { grid-area: due; justify-self: end; text-align: right; }
    html.qx .qx-svc__go { grid-area: go; justify-self: start; }
    html.qx .qx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    html.qx .qx-svc { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ico main" "ico status" "price due" "go go"; padding: 14px 14px 14px 18px; gap: 8px 12px; }
    html.qx .qx-svc__ico { width: 44px; height: 44px; border-radius: 13px; }
    html.qx .qx-svc__status { justify-self: start; }
    html.qx .qx-svc__title { white-space: normal; }
    html.qx .qx-svc__go { justify-self: stretch; justify-content: center; }
    html.qx .qx-svchero { padding: 20px 16px 18px; }
    html.qx .qx-svchero__top { flex-wrap: wrap; }
    html.qx .qx-svchero__status { width: 100%; }
    html.qx .qx-svchero__actions .btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
    html.qx .qx-btn-quiet { margin-left: 0; }
    html.qx .qx-inv--head { display: none; }
    html.qx .qx-inv { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 6px; }
    html.qx .qx-inv__cell { grid-column: 1; font-size: .86rem; flex-direction: row; gap: .35rem; flex-wrap: wrap; }
    html.qx .qx-inv__cell::before { content: attr(data-l) ":"; color: var(--qx-steel); font-weight: 600; }
    html.qx .qx-inv__total { grid-column: 2; grid-row: 1; text-align: right; }
    html.qx .qx-inv__act { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
}

/* service partials from modules: long values (URLs, hostnames) wrap instead of overflowing on phones */
html.qx body.order-manage .card .table td, html.qx body.order-manage .card .table th { overflow-wrap: anywhere; }

/* invoice page (/invoice/<hash>, module template): item titles read as titles; on phones the items become stacked rows
   (the 4-column table was wider than the screen and body overflow is clipped) and payment methods take the full width */
html.qx body.invoice-invoice .card-body table.table-hover td a { color: var(--qx-navy); font-weight: 600; text-decoration: none; }
html.qx body.invoice-invoice .card-body table.table-hover td a:hover { color: var(--qx-royal-2); text-decoration: underline; }
html.qx body.invoice-invoice .invoice-gateway { transition: border-color .2s, box-shadow .2s; }
html.qx body.invoice-invoice .invoice-gateway:hover { border-color: var(--qx-cyan) !important; box-shadow: var(--qx-sh-1); }
@media (max-width: 767.98px) {
    html.qx body.invoice-invoice .invoice-gateway { flex: 1 1 100%; min-width: 0 !important; }
    html.qx body.invoice-invoice table.table-hover thead { display: none; }
    html.qx body.invoice-invoice table.table-hover, html.qx body.invoice-invoice table.table-hover tbody { display: block; width: 100%; }
    html.qx body.invoice-invoice table.table-hover tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; padding: 14px 4px; border-bottom: 1px solid var(--qx-line); }
    html.qx body.invoice-invoice table.table-hover td { display: block; padding: 0; border: 0; background: transparent; box-shadow: none; }
    html.qx body.invoice-invoice table.table-hover td:nth-child(1) { display: none; }
    html.qx body.invoice-invoice table.table-hover td:nth-child(2) { grid-column: 1 / -1; overflow-wrap: anywhere; font-size: 1rem; }
    html.qx body.invoice-invoice table.table-hover td:nth-child(3) { color: var(--qx-steel); font-size: .88rem; }
    html.qx:lang(es) body.invoice-invoice table.table-hover td:nth-child(3)::before { content: "Precio "; }
    html.qx:not(:lang(es)) body.invoice-invoice table.table-hover td:nth-child(3)::before { content: "Price "; }
    html.qx body.invoice-invoice table.table-hover td:nth-child(4) { text-align: right; font-family: var(--qx-mono); font-weight: 600; color: var(--qx-navy); }
    html.qx body.invoice-invoice .offset-md-8 { margin-left: 0; }
}

/* container qx.js puts around a table that is wider than the screen */
html.qx .qx-scroll-x { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
html.qx .qx-scroll-x > table { margin-bottom: 0; }
