/* Shared styling for the OEM prototype surfaces. Approximates the host panels
   (cPanel Jupiter / WHMCS) closely enough to make the embedding believable,
   while carrying the white-label "WebPros CDN & Security" brand. */

:root {
  --wp-navy: #0b1f3a;
  --wp-blue: #1d6fe0;
  --wp-blue-dark: #144fa3;
  --wp-teal: #14a8a0;
  --ink: #1f2733;
  --muted: #66707d;
  --line: #e3e8ef;
  --bg: #f4f6f9;
  --card: #ffffff;
  --green: #1d9d5a;
  --green-bg: #e7f6ee;
  --amber: #b7791f;
  --amber-bg: #fdf6e3;
  --red: #d13b3b;
  --red-bg: #fdeaea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--wp-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--wp-navy); margin: 0; }

.container { max-width: 1080px; margin: 0 auto; padding: 24px; }

/* ---- brand bar ---- */
.brandbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brandbar .logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--wp-blue), var(--wp-teal));
  display: grid; place-items: center; color: #fff; font-weight: 800;
}
.brandbar .title { font-weight: 700; color: var(--wp-navy); font-size: 15px; }
.brandbar .powered { color: var(--muted); font-size: 12px; }
.brandbar .powered b { color: var(--wp-navy); }
.brandbar .spacer { flex: 1; }
.brandbar .ctx { font-size: 12px; color: var(--muted); }

/* ---- cards ---- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.card + .card { margin-top: 16px; }
.card h3 { font-size: 15px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

/* ---- stat tiles ---- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 24px; font-weight: 800; color: var(--wp-navy); margin-top: 4px; }
.stat .delta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.green { color: var(--green); background: var(--green-bg); }
.badge.amber { color: var(--amber); background: var(--amber-bg); }
.badge.red { color: var(--red); background: var(--red-bg); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px;
}
.btn:hover { border-color: #c7cfdb; }
.btn.primary { background: var(--wp-blue); border-color: var(--wp-blue); color: #fff; }
.btn.primary:hover { background: var(--wp-blue-dark); border-color: var(--wp-blue-dark); }
.btn.danger { color: var(--red); border-color: #f0c4c4; }
.btn.danger:hover { background: var(--red-bg); }
.btn.lg { padding: 11px 20px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- toggle row ---- */
.feature { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: none; }
.feature .icon { width: 38px; height: 38px; border-radius: 9px; background: #eef4fe; color: var(--wp-blue); display: grid; place-items: center; flex: none; }
.feature .meta { flex: 1; }
.feature .meta .name { font-weight: 700; color: var(--wp-navy); }
.feature .meta .desc { color: var(--muted); font-size: 12.5px; }

.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cdd5e0; border-radius: 999px; transition: .15s; }
.switch .slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: .6; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--wp-blue); color: #fff; }

/* ---- table ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

/* ---- misc ---- */
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.dns-box { background: #0e1726; color: #d7e3f4; border-radius: 8px; padding: 12px 14px; font-family: ui-monospace, monospace; font-size: 12.5px; overflow-x: auto; }
.dns-box .k { color: #6ea8fe; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.notice { padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.notice.info { background: #eef4fe; color: var(--wp-blue-dark); }
.notice.warn { background: var(--amber-bg); color: var(--amber); }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--wp-navy); color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; }
select, input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }

/* host-chrome framing so the embed looks "inside" the panel */
.host-chrome { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.host-chrome .host-top { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #f0f2f6; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.host-chrome .dot3 { display: flex; gap: 5px; }
.host-chrome .dot3 i { width: 10px; height: 10px; border-radius: 50%; background: #cdd5e0; }
.host-chrome .embed-note { margin-left: auto; font-style: italic; }
