/* HostingJet OS 1.0.0 — customer panel
   Same design language as the admin: navy flight deck, paper workspace,
   one jet-green accent, mono for technical values. */

body.hostingjet-panel-page { margin: 0 !important; padding: 0 !important; background: #f4f6f8 !important; }
body.hostingjet-panel-page #wpadminbar { display: none !important; }
body.hostingjet-panel-page :where(.site-header, .site-footer, #masthead, #colophon,
  .wp-site-blocks > header, .wp-site-blocks > footer,
  header.wp-block-template-part, footer.wp-block-template-part,
  .elementor-location-header, .elementor-location-footer) { display: none !important; }
body.hostingjet-panel-page :where(#page, #content, .site, .site-content, .content-area,
  .entry-content, .entry, .page, .hentry, .wp-site-blocks, .wp-block-post-content) {
  margin: 0 !important; padding: 0 !important; max-width: none !important; width: 100% !important;
}
body.hostingjet-panel-page .entry-content > * { max-width: none !important; margin: 0 !important; }

.hj-panel-root {
  --navy-900: #071527; --navy-800: #0b1f3a; --navy-700: #12294a;
  --ink: #16263c; --body: #43536b; --muted: #6d7c92;
  --line: #e3e9ef; --paper: #f4f6f8; --card: #ffffff;
  --jet: #4fc62f; --jet-dark: #2f8f17; --jet-soft: #e9f9e3;
  --warn: #b76a00; --warn-soft: #fff5e3;
  --bad: #c22f2f; --bad-soft: #fdecec;
  --blue: #0d62ff; --blue-soft: #e9f1ff;
  --mono: "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --shadow: 0 14px 40px rgba(7, 21, 39, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased;
}
.hj-panel-root *, .hj-panel-root *::before, .hj-panel-root *::after { box-sizing: border-box; }
.hj-panel-root h1, .hj-panel-root h2, .hj-panel-root h3, .hj-panel-root p { margin: 0; }
.hj-panel-root svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.hj-panel-root button { font: inherit; }

body.hostingjet-panel-page .hj-panel-root { position: fixed; inset: 0; z-index: 999999; }

/* ------------------------------------------------------------- Shell */

.hj-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); width: 100%; height: 100vh; height: 100dvh; overflow: hidden; background: var(--paper); }

.hj-sidebar {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #cdd8e6; padding: 24px 14px 16px; overflow-y: auto;
}
.hj-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; }
.hj-brand-mark, .hj-gate-mark {
  width: 32px; height: 32px; border-radius: 10px; position: relative; flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,0)) padding-box,
              linear-gradient(135deg, var(--jet, #4fc62f), #1f6f0e) border-box;
  border: 1px solid transparent;
}
.hj-brand-mark::after, .hj-gate-mark::after {
  content: ""; position: absolute; inset: 7px; background: #eafbe2;
  clip-path: polygon(0 46%, 100% 0, 66% 48%, 100% 100%, 0 60%, 40% 51%);
  transform: rotate(-8deg);
}
.hj-brand b { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.hj-brand b i { font-style: normal; color: var(--jet); }

.hj-sidebar nav { display: grid; gap: 3px; }
.hj-nav {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 11px; text-align: left;
  background: transparent; color: #a9bacd; font-weight: 600; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.hj-nav:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.hj-nav.active { color: #fff; background: rgba(79, 198, 47, 0.14); box-shadow: inset 2px 0 0 var(--jet); }
.hj-nav.active svg { color: var(--jet); }
.hj-nav em { font-style: normal; background: var(--jet); color: #082400; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 800; margin-left: 4px; }

.hj-user { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.hj-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--jet); color: #082400; display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.hj-user strong { display: block; color: #fff; font-size: 13px; }
.hj-user span { display: block; color: #8b9db3; font-size: 12px; word-break: break-all; }

/* -------------------------------------------------------------- Main */

.hj-main { overflow-y: auto; padding: 30px 34px 20px; min-width: 0; }
.hj-topbar { margin-bottom: 22px; }
.hj-topbar h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.hj-topbar p { margin-top: 6px; color: var(--muted); }
.hj-stage { display: block; }
.hj-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding: 14px 2px; color: var(--muted); font-size: 12px; font-family: var(--mono); border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ Pieces */

.hj-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.hj-metrics-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hj-metric {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow);
}
.hj-metric svg { width: 22px; height: 22px; color: var(--navy-700); }
.hj-metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.hj-metric strong { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -0.02em; }

.hj-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.hj-site { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.hj-site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hj-site-head strong { display: block; font-size: 16px; letter-spacing: -0.02em; word-break: break-all; }
.hj-site-head small { display: block; color: var(--muted); margin-top: 3px; }
.hj-site-tech { display: flex; gap: 10px 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; align-items: center; }
.hj-panel-root code { font-family: var(--mono); font-size: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; color: var(--navy-800); }
.hj-site-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.hj-site-foot time { margin-left: auto; color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.hj-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.hj-note.bad { color: var(--bad); }

.hj-usage-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.hj-usage-top span { color: var(--muted); font-size: 12px; font-weight: 700; }
.hj-usage-top b { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.hj-bar { height: 7px; border-radius: 999px; background: #e8edf2; overflow: hidden; }
.hj-bar i { display: block; height: 100%; border-radius: 999px; background: var(--jet); transition: width .5s ease; }
.hj-bar i.hot { background: var(--bad); }

.hj-panelbox { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.hj-panelbox h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.hj-panelbox-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.hj-panelbox-head h2 { margin: 0; }
.hj-sub { color: var(--body); line-height: 1.6; margin: 6px 0 14px; }
.hj-sub:last-child { margin-bottom: 0; }

.hj-rows { display: grid; }
.hj-rowline { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--paper); flex-wrap: wrap; }
.hj-rowline:last-child { border-bottom: 0; }
.hj-rowline > div:first-child { margin-right: auto; min-width: 0; }
.hj-rowline strong { display: block; font-weight: 700; }
.hj-rowline small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hj-amount { font-family: var(--mono); font-weight: 700; }

.hj-ns { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hj-ns-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.hj-ns-item span { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--muted); }
.hj-ns-item code { background: transparent; border: 0; padding: 0; font-size: 13px; }

.hj-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.hj-tool {
  display: grid; place-items: center; gap: 8px; padding: 18px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  color: var(--navy-700); font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hj-tool:hover { border-color: var(--jet); box-shadow: 0 10px 26px rgba(79, 198, 47, 0.14); }

.hj-support { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.hj-callout { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: 16px; background: var(--warn-soft); border: 1px solid #f0dcb8; flex-wrap: wrap; }
.hj-callout strong { display: block; color: var(--warn); }
.hj-callout span { color: #8a5a10; font-size: 13px; }

/* ------------------------------------------------------------- Forms */

.hj-form label { display: block; margin-bottom: 13px; font-weight: 700; font-size: 13px; }
.hj-form input, .hj-form select, .hj-form textarea {
  display: block; width: 100%; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.4;
}
.hj-form input:focus, .hj-form select:focus, .hj-form textarea:focus {
  border-color: var(--jet); outline: none; box-shadow: 0 0 0 3px rgba(79, 198, 47, 0.18);
}

/* ----------------------------------------------------------- Buttons */

.hj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
  padding: 10px 16px; font-weight: 700; font-size: 13px;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.hj-btn:hover { border-color: #c4d0dd; }
.hj-btn:active { transform: translateY(1px); }
.hj-btn:disabled { opacity: .6; cursor: default; }
.hj-btn:focus-visible { outline: 2px solid rgba(79,198,47,.55); outline-offset: 2px; }
.hj-btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.hj-btn-dark { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.hj-btn-dark:hover { background: var(--navy-700); border-color: var(--navy-700); }
.hj-btn-green { background: var(--jet); border-color: var(--jet); color: #082400; }
.hj-btn-green:hover { background: #5ed83d; border-color: #5ed83d; }
.hj-btn-ghost { background: var(--paper); }

/* -------------------------------------------------------------- Pills */

.hj-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 11px;
  font-size: 12px; font-weight: 800; text-transform: capitalize;
  background: var(--blue-soft); color: var(--blue); white-space: nowrap;
}
.hj-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hj-pill-active, .hj-pill-valid, .hj-pill-paid, .hj-pill-resolved, .hj-pill-closed { background: var(--jet-soft); color: var(--jet-dark); }
.hj-pill-pending, .hj-pill-provisioning, .hj-pill-unknown, .hj-pill-unpaid, .hj-pill-open { background: var(--warn-soft); color: var(--warn); }
.hj-pill-failed, .hj-pill-suspended, .hj-pill-overdue, .hj-pill-expired { background: var(--bad-soft); color: var(--bad); }

/* ------------------------------------------------- Empty, load, toast */

.hj-empty { text-align: center; padding: 56px 24px; background: var(--card); border: 1px dashed var(--line); border-radius: 16px; }
.hj-empty svg { width: 34px; height: 34px; color: var(--muted); margin-bottom: 12px; }
.hj-empty h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.hj-empty p { color: var(--body); max-width: 480px; margin: 0 auto 16px; line-height: 1.6; }

.hj-loader { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; background: var(--paper); padding: 40px; }
.hj-loader div { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #dfe6ec; border-top-color: var(--jet); animation: hjspin 0.9s linear infinite; }
.hj-loader strong { font-size: 19px; letter-spacing: -0.02em; }
.hj-loader span { color: var(--muted); }
.hj-loader.error strong { color: var(--bad); }
@keyframes hjspin { to { transform: rotate(360deg); } }

.hj-toast {
  position: fixed; right: 26px; bottom: 24px; z-index: 1000001;
  background: var(--navy-900); color: #fff; border-radius: 13px;
  padding: 13px 18px; font-weight: 700; box-shadow: 0 18px 50px rgba(7, 21, 39, 0.35);
  animation: hjtoast .25s ease;
}
.hj-toast.bad { background: var(--bad); }
@keyframes hjtoast { from { opacity: 0; transform: translateY(8px); } }

/* -------------------------------------------------------- Login gate */

.hj-login-gate { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 40px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.hj-gate-mark { display: block; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 6px; }
.hj-login-gate h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; color: #16263c; }
.hj-login-gate p { margin: 0 0 10px; color: #6d7c92; }
.hj-login-btn { display: inline-block; background: #0b1f3a; color: #fff; border-radius: 12px; padding: 12px 22px; font-weight: 800; text-decoration: none; }
.hj-login-btn:hover { background: #12294a; color: #fff; }

/* --------------------------------------------------------- Responsive */

@media (max-width: 1250px) { .hj-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  body.hostingjet-panel-page { overflow: auto !important; }
  body.hostingjet-panel-page .hj-panel-root { position: relative; }
  .hj-shell { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .hj-sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px; gap: 4px; position: sticky; top: 0; z-index: 40; }
  .hj-brand { padding: 0 8px; margin-right: auto; }
  .hj-sidebar nav { display: flex; flex-wrap: wrap; }
  .hj-nav { width: auto; padding: 9px 11px; }
  .hj-nav span em { margin-left: 3px; }
  .hj-user { display: none; }
  .hj-main { padding: 20px 16px 16px; overflow: visible; }
  .hj-metrics, .hj-metrics-3 { grid-template-columns: 1fr; }
  .hj-support { grid-template-columns: 1fr; }
  .hj-sites { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hj-panel-root *, .hj-loader div { animation: none !important; transition: none !important; }
}
