/* HostPanel storefront — an Amazon-style hosting store.
   Brand colors come from CSS variables set by the layout (admin/reseller branding). The call-to-action
   buttons and search button follow the saved PRIMARY color (with its paired primary-text), so the
   Branding → Colors pickers control them; the fallback keeps the original Amazon look if unset. */

:root {
  --maxw: 1500px;
  /* Call-to-action chrome: follows the brand's primary color (set in Branding → Colors). */
  --az-nav: #131921;
  --az-nav2: #232f3e;
  --az-search: var(--primary, #febd69);
  --az-search-h: color-mix(in srgb, var(--primary, #febd69) 85%, black);
  --az-yellow: var(--primary, #ffd814);
  --az-yellow-h: color-mix(in srgb, var(--primary, #ffd814) 86%, black);
  --az-yellow-br: color-mix(in srgb, var(--primary, #ffd814) 78%, black);
  --az-yellow-text: var(--primary-text, #0f1111);
  --az-orange: #f08804;
  --az-link: #007185;
  --az-link-h: #c7511f;
  --az-page: #eaeded;
  --shadow-xs: 0 1px 2px rgba(15, 17, 17, .08);
  --shadow-sm: 0 1px 3px rgba(15, 17, 17, .12);
  --shadow: 0 3px 10px rgba(15, 17, 17, .14);
  --shadow-lg: 0 10px 28px rgba(15, 17, 17, .18);
  --ring: 0 0 0 3px rgba(0, 113, 133, .35);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --tr: .15s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font, "Amazon Ember", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  color: var(--text, #0f1111); background: var(--bg, #eaeded); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: var(--az-link); text-decoration: none; }
a:hover { color: var(--az-link-h); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2rem); }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted, #565959); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; }
.pre { white-space: pre-line; }
.inline { display: inline; }
.main { min-height: 60vh; }
.section { padding: 32px 0; }
.section-title { text-align: center; margin-bottom: 24px; }

/* ============================ Amazon header ============================ */
.az-header { position: sticky; top: 0; z-index: 40; }
.az-top {
  display: flex; align-items: center; gap: 10px; padding: 7px 14px;
  background: var(--az-nav); color: #fff;
}
.az-logo { display: flex; align-items: center; padding: 8px 9px; border: 1px solid transparent; border-radius: 3px; color: #fff; }
.az-logo:hover { border-color: #fff; text-decoration: none; }
.az-logo-name { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.brand-logo { max-height: 38px; width: auto; }

.az-search { flex: 1 1 auto; display: flex; min-width: 0; max-width: 980px; height: 40px; border-radius: 8px; overflow: hidden; background: #fff; }
.az-search:focus-within { box-shadow: 0 0 0 3px var(--az-search); }
.az-search-input { flex: 1 1 auto; min-width: 0; border: 0; padding: 0 14px; font: inherit; font-size: 15px; color: #0f1111; background: #fff; border-radius: 0; }
.az-search-input:focus { outline: none; box-shadow: none; }
.az-search-btn { flex: 0 0 46px; border: 0; background: var(--az-search); color: #0f1111; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.az-search-btn:hover { background: var(--az-search-h); }

.az-top-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.az-block { display: flex; flex-direction: column; justify-content: center; padding: 6px 9px; border: 1px solid transparent; border-radius: 3px; color: #fff; line-height: 1.25; }
.az-block:hover { border-color: #fff; text-decoration: none; color: #fff; }
.az-l1 { font-size: 12px; color: #e3e6e6; }
.az-l2 { font-size: 14px; font-weight: 700; color: #fff; }
.az-logout { padding: 0; margin: 0; background: none; border: 0; }
.az-logout button { display: flex; flex-direction: column; justify-content: center; padding: 6px 9px; border: 1px solid transparent; border-radius: 3px; background: none; color: #fff; font: inherit; line-height: 1.25; text-align: left; cursor: pointer; }
.az-logout button:hover { border-color: #fff; }
.az-cart { display: flex; align-items: flex-end; gap: 4px; padding: 10px 9px 6px; border: 1px solid transparent; border-radius: 3px; color: #fff; position: relative; }
.az-cart:hover { border-color: #fff; text-decoration: none; color: #fff; }
.az-cart-ico { position: relative; display: flex; align-items: flex-end; }
.az-cart-count { position: absolute; top: -10px; left: 15px; min-width: 18px; text-align: center; font-size: 15px; font-weight: 700; color: var(--az-orange); }
.az-cart-label { font-size: 14px; font-weight: 700; }

.az-sub { background: var(--az-nav2); color: #fff; }
.az-sub-inner { display: flex; align-items: center; gap: 4px; padding: 3px 10px; }
.az-burger { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; border-radius: 3px; color: #fff; font: inherit; font-weight: 700; font-size: .92rem; padding: 7px 8px; cursor: pointer; }
/* On desktop the department menu is already shown inline, so the "All" toggle has nothing to do — hide it. */
@media (min-width: 761px) { .az-burger { display: none; } }
.az-burger:hover { border-color: #fff; }
.az-depts .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; align-items: center; }
.az-depts .menu li { position: relative; }
.az-depts .menu a, .az-depts .menu .link-button { display: block; color: #fff; padding: 7px 11px; font-size: .9rem; font-weight: 500; border: 1px solid transparent; border-radius: 3px; }
.az-depts .menu a:hover, .az-depts .menu .link-button:hover { border-color: #fff; text-decoration: none; }
.az-depts .menu .menu { position: absolute; left: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px; box-shadow: var(--shadow-lg); z-index: 5; }
.az-depts .menu li:hover > .menu, .az-depts .menu li:focus-within > .menu { display: flex; }
.az-depts .menu .menu a, .az-depts .menu .menu .link-button { color: var(--text); }
.az-depts .menu .menu a:hover { background: var(--az-page); border-color: transparent; }

@media (max-width: 760px) {
  .az-top { flex-wrap: wrap; }
  .az-search { order: 3; flex-basis: 100%; max-width: none; }
  .az-depts { display: none; position: absolute; left: 0; right: 0; background: var(--az-nav2); padding: 6px 10px 12px; box-shadow: var(--shadow); z-index: 6; }
  .az-depts.open { display: block; }
  .az-depts .menu { flex-direction: column; align-items: stretch; }
  .az-depts .menu .menu { display: flex; position: static; box-shadow: none; border: 0; background: transparent; padding-left: 12px; }
  .az-depts .menu .menu a { color: #fff; }
}

/* ============================ Amazon store grid ============================ */
.az-page { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; max-width: var(--maxw); margin: 0 auto; padding: 18px 16px; }
.az-rail { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; align-self: start; }
.az-rail-h { font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.az-rail-list { list-style: none; margin: 0; padding: 0; }
.az-rail-list li { margin: 0; }
.az-rail-list a { display: block; padding: 6px 0; font-size: .92rem; color: var(--az-link); }
.az-rail-list li.active a { font-weight: 700; color: var(--text); }
.az-results { min-width: 0; }
.az-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 16px; }
.az-cat-title { margin: 0; font-size: 1.5rem; }
.az-count { margin: 0; color: var(--muted); font-size: .92rem; }
.az-crumbs { color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.az-crumbs a { color: var(--az-link); }
.az-sep { margin: 0 6px; color: var(--muted); }

.az-cat { margin-bottom: 30px; }
.az-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.az-cat-head h2 { margin: 0; font-size: 1.3rem; }
.az-see { font-size: .9rem; white-space: nowrap; }
.az-cat-desc { color: var(--muted); font-size: .9rem; margin: 2px 0 14px; }
.az-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.az-empty { color: var(--muted); padding: 24px 0; }

.az-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; transition: box-shadow var(--tr), border-color var(--tr); }
.az-card:hover { box-shadow: var(--shadow); border-color: #c7cdd1; }
.az-card-img { display: block; height: 170px; border-radius: 6px; overflow: hidden; margin-bottom: 14px; background: #f3f4f6; }
.az-card-img img { width: 100%; height: 100%; object-fit: cover; }
.az-card-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center; padding: 10px; font-weight: 700; font-size: 1rem; color: var(--muted); background: linear-gradient(135deg, #eef1f3, #e2e6ea); }
.az-card-title { display: block; color: var(--az-link); font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.az-card-title:hover { color: var(--az-link-h); }
.az-card-desc { color: var(--muted); font-size: .85rem; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.az-price { display: flex; align-items: baseline; gap: 3px; margin: 2px 0 12px; }
.az-amt { font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.az-per { color: var(--muted); font-size: .85rem; }
.az-feats { list-style: none; margin: 0 0 16px; padding: 0; }
.az-feats li { position: relative; padding: 4px 0 4px 18px; font-size: .82rem; color: #0f1111; }
.az-feats li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--az-orange); }

/* ============================ Yellow Amazon buttons ============================ */
.az-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: auto; padding: 9px 16px; border-radius: 20px; border: 1px solid var(--az-yellow-br); background: var(--az-yellow); color: var(--az-yellow-text); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-align: center; box-shadow: var(--shadow-xs); transition: background var(--tr); }
.az-btn:hover { background: var(--az-yellow-h); text-decoration: none; color: var(--az-yellow-text); }
.az-btn:active { background: var(--az-yellow-h); }
.az-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.az-btn.block { display: flex; width: 100%; }

/* ============================ Product (buy-box) page ============================ */
.az-pdp { max-width: var(--maxw); margin: 0 auto; padding: 18px 16px; }
.az-pdp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 320px; gap: 30px; align-items: start; }
.az-pdp-media { align-self: start; }
.az-pdp-img { width: 100%; border: 1px solid var(--border); border-radius: 8px; }
.az-pdp-ph { height: 340px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-weight: 700; font-size: 1.2rem; color: var(--muted); background: linear-gradient(135deg, #eef1f3, #e2e6ea); border: 1px solid var(--border); border-radius: 8px; }
.az-pdp-title { font-size: 1.7rem; font-weight: 600; margin: 0 0 8px; }
.az-pdp-lead { color: #0f1111; font-size: 1.05rem; }
.az-rule { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.az-about { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; }
.az-pdp-feats { list-style: none; margin: 0; padding: 0; }
.az-pdp-feats li { position: relative; padding: 6px 0 6px 24px; }
.az-pdp-feats li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: #007600; font-weight: 800; }
.az-buybox { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px; align-self: start; position: sticky; top: 16px; box-shadow: var(--shadow-sm); }
.az-bb-note { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; margin: 12px 0 0; }
.az-tick { color: #007600; font-weight: 800; }
.az-promo { max-width: var(--maxw); margin: 28px auto 0; padding: 0 16px; }

@media (max-width: 1000px) { .az-pdp-grid { grid-template-columns: 1fr; } .az-buybox { position: static; } }
@media (max-width: 860px) { .az-page { grid-template-columns: 1fr; } .az-rail { display: none; } }

/* ============================ Buttons / forms (cart, checkout, client) ============================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: center; box-shadow: var(--shadow-xs); transition: background var(--tr), box-shadow var(--tr); }
.btn:hover { text-decoration: none; box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--az-yellow); border-color: var(--az-yellow-br); color: var(--az-yellow-text); border-radius: 20px; }
.btn-primary:hover { background: var(--az-yellow-h); }
.btn-light { background: #fff; color: var(--az-link); border-color: #fff; }
.btn-sm { padding: 6px 13px; font-size: .875rem; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.block { display: flex; width: 100%; }
.link-button { background: none; border: 0; box-shadow: none; color: var(--az-link); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: #c40000; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: var(--surface); color: var(--text); transition: border-color var(--tr), box-shadow var(--tr);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--az-link); box-shadow: var(--ring); }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.form-narrow { max-width: 520px; }

/* ============================ Cards, grids, sections ============================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px; box-shadow: var(--shadow-xs); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.features { list-style: none; padding: 0; margin: 0 0 18px; }
.features li { padding: 6px 0 6px 24px; position: relative; border-bottom: 1px solid var(--border); }
.features li::before { content: "✓"; position: absolute; left: 0; color: #007600; font-weight: 700; }
.feature h3 { font-size: 1.1rem; }
.category-title { margin-top: 28px; }

.hero { position: relative; overflow: hidden; padding: 72px 0; background: linear-gradient(135deg, var(--az-nav), var(--az-nav2)); color: #fff; }
.hero.align-center { text-align: center; }
.hero .lead { font-size: 1.2rem; opacity: .95; max-width: 680px; }
.hero.align-center .lead { margin-left: auto; margin-right: auto; }
.hero .btn-primary { background: var(--az-yellow); color: var(--az-yellow-text); border-color: var(--az-yellow-br); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; box-shadow: var(--shadow-sm); }
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; color: var(--muted); }
.faq { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin: 10px 0 0; }
.quote p { font-style: italic; }
.figure { text-align: center; }
.figure img { border-radius: 8px; box-shadow: var(--shadow-sm); }
.prose p { margin-bottom: 1em; }

/* ============================ Tables ============================ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tfoot th { font-size: 1rem; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; }

/* ============================ Badges, alerts ============================ */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: capitalize; background: #e5e7eb; color: #374151; }
.status-active, .status-paid { background: #dcfce7; color: #166534; }
.status-pending, .status-provisioning, .status-unpaid { background: #fef9c3; color: #854d0e; }
.status-suspended, .status-failed, .status-cancelled, .status-terminated { background: #fee2e2; color: #991b1b; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0; border: 1px solid transparent; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.safe-mode { background: #131921; color: #febd69; padding: 8px 16px; text-align: center; font-size: .9rem; }
.safe-mode a { color: #fff; text-decoration: underline; }

/* ============================ Footer ============================ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 40px; }
.site-footer .footer-top { text-align: center; padding: 14px; background: var(--az-nav2); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 36px 0 10px; }
.footer-inner > div { max-width: 340px; }
.site-footer strong { font-size: 1.1rem; }
.site-footer a { color: var(--footer-text); opacity: .85; }
.site-footer a:hover { opacity: 1; color: var(--footer-text); }
.site-footer .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 0 0; font-size: .85rem; }
.footer-legal a { opacity: .85; }
.footer-legal a + a { position: relative; }
.footer-legal a + a::before { content: "·"; position: absolute; left: -10px; opacity: .6; }
.footer-note { padding: 18px 0 24px; font-size: .85rem; opacity: .7; }

/* ============================ Auth, product-page legacy ============================ */
.product-page { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; } }
.auth-card { max-width: 440px; margin: 36px auto; box-shadow: var(--shadow-sm); }

/* ============================ Client area ============================ */
.client-grid { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
@media (max-width: 860px) { .client-grid { grid-template-columns: 1fr; } }
.client-nav .menu { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.client-nav .menu a { display: block; padding: 9px 12px; color: var(--text); border-radius: 8px; }
.client-nav .menu a:hover { background: var(--az-page); text-decoration: none; }
.client-nav .menu li.active > a { background: var(--az-page); color: var(--az-link); font-weight: 600; }
.client-main h2 { margin-top: 32px; }
.stat { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.stat:hover { text-decoration: none; border-color: var(--az-link); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--az-link); }
.service-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.service-meta { text-align: right; }
.service-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.usage { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.usage-label { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; margin-bottom: 6px; }
.bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--az-link); }
.bar-fill.warn { background: #c40000; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.details dt { font-weight: 600; color: var(--muted); }
.details dd { margin: 0; word-break: break-all; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.action { padding: 14px; }
.console-log { max-height: 320px; overflow: auto; background: #0b1020; color: #d1fae5; padding: 12px; border-radius: 8px; white-space: pre-wrap; }
.invoice-head, .invoice-parties { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
@media print { .az-header, .site-footer, .client-nav, .btn, .az-btn { display: none !important; } .card { border: 0; box-shadow: none; } }

/* ============================ Console ============================ */
body.blank { background: #000; color: #e5e7eb; }
.console-shell { display: flex; flex-direction: column; height: 100vh; }
.console-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #131921; color: #e5e7eb; }
.console-bar .btn { background: #1f2937; color: #e5e7eb; border-color: #374151; }
.console-bar .spacer { flex: 1; }
.console-screen { flex: 1; overflow: hidden; }

/* ============================ Support area ============================ */
.support-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 24px; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.kb-card { display: block; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-xs); }
.kb-card:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
.kb-card h3 { margin: 0; font-size: 1rem; }
.kb-cats ul { columns: 2; list-style: none; padding: 0; }
.kb-body { line-height: 1.7; }
.kb-body pre { background: var(--az-page); padding: 12px 14px; border-radius: 8px; overflow: auto; }
.kb-body code { background: var(--az-page); padding: 1px 5px; border-radius: 4px; }
.ticket-thread { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.msg { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.msg-staff { border-left: 3px solid var(--az-link); }
.msg-note { background: #fff8e1; border-color: #f5e0a3; }
.msg-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; font-size: .9rem; }
.msg-body { white-space: normal; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ============================ Live chat ============================ */
.chat-box { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 12px; max-width: 680px; }
.chat-log { height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.chat-msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; }
.chat-me { align-self: flex-end; background: var(--az-link); color: #fff; }
.chat-them { align-self: flex-start; background: var(--az-page); border: 1px solid var(--border); }
.chat-system { align-self: center; font-size: .85rem; color: var(--muted); }
.chat-name { display: block; font-size: .72rem; opacity: .75; margin-bottom: 2px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; }
.chat-status { font-size: .8rem; margin-top: 6px; min-height: 1em; }
.chat-presence { display: flex; align-items: center; gap: 8px; font-size: .85rem; padding: 6px 2px; color: var(--muted); }
.chat-presence .chat-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.chat-presence.on .chat-dot { background: #16a34a; }
.chat-presence.off .chat-dot { background: #c40000; }

/* ============================ On-site card payment ============================ */
.pay-box { margin-top: 16px; }
.pay-box h3 { margin: 0 0 10px; }
.pay-element { border: 0; padding: 0; background: transparent; min-height: 0; margin: 10px 0; }
.pay-box .pay-msg { margin-top: 10px; min-height: 1em; }
.pf { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0 0 12px; }
.pf-row { display: flex; gap: 12px; }
.pf-row .pf { flex: 1; }
.pf-field { display: block; border: 1px solid var(--border); border-radius: 8px; padding: 13px 12px; margin-top: 6px; background: var(--surface); transition: border-color var(--tr), box-shadow var(--tr); }
.pf-field.StripeElement--focus { border-color: var(--az-link); box-shadow: var(--ring); }
.pf-field.StripeElement--invalid { border-color: #c40000; }

/* Cart add-on sub-lines (sub-packages under a plan) */
.cart-addon td { border-top: 0; padding-top: 4px; padding-bottom: 4px; }
.cart-addon td.sub { padding-left: 26px; color: var(--muted); font-size: .9rem; }
.ship-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.ship-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border, #ddd); border-radius: 6px; cursor: pointer; }
.ship-opt input { margin: 0; }
.ship-opt.disabled { opacity: .55; cursor: not-allowed; }

/* Self-contained captcha */
.captcha{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.captcha svg{border:1px solid var(--border);border-radius:8px;display:block}
.captcha-reload{font-size:1.35rem;line-height:1;text-decoration:none;color:var(--muted)}
.captcha-reload:hover{color:var(--az-link,var(--primary))}
