/* Virtual Guardians brand system — docs/OWNER-CONSOLE.md §8b.
   Source of truth: the VG website design tokens (Wix-Studio-Build-Spec §1/§2,
   live at virtual-guardians.com). Shared by the Owner Console now; the tenant
   Admin Console re-skins onto this in slice O5. */

:root {
  --vg-indigo: #2e3192;
  --vg-blue: #0071bc;
  --vg-teal: #00a99d;
  --vg-teal-dark: #009288; /* primary-button hover: teal darkened ~10% */
  --vg-dark: #1a1a1a;
  --vg-mid: #6e6e6e;
  --vg-light: #f2f4f8;
  --vg-green: #2e8b57;
  --vg-red: #c2362a;
  --vg-card-bd: #e5e7eb;
  --vg-font:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
/* The hidden attribute must beat any class's explicit display (e.g. .vg-btn) */
[hidden] { display: none !important; }

body.vg {
  margin: 0;
  min-height: 100vh;
  background: var(--vg-light);
  color: var(--vg-dark);
  font-family: var(--vg-font);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

.vg h1, .vg h2, .vg h3 { color: var(--vg-indigo); font-weight: 700; margin: 0; }
.vg h1 { font-size: 26px; }
.vg h2 { font-size: 20px; }
.vg a { color: var(--vg-blue); }

/* Header: VG logo + product wordmark, white bar, indigo text */
.vg-header {
  background: #fff;
  border-bottom: 1px solid var(--vg-card-bd);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.vg-header img.logo { height: 44px; width: auto; }
.vg-header .wordmark { font-size: 18px; font-weight: 700; color: var(--vg-indigo); }
.vg-header .spacer { flex: 1; }
.vg-header .who { font-size: 14px; color: var(--vg-mid); }

.vg-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 24px; }

/* Cards (site card pattern: white, 1px #E5E7EB, 12px radius) */
.vg-card {
  background: #fff;
  border: 1px solid var(--vg-card-bd);
  border-radius: 12px;
  padding: 32px;
}

/* Buttons (site Section 1: Primary teal / Secondary indigo outline / Ghost) */
.vg-btn {
  display: inline-block;
  background: var(--vg-teal);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 14px 28px;
  font: 600 16px var(--vg-font);
  text-decoration: none;
  cursor: pointer;
}
.vg-btn:hover { background: var(--vg-teal-dark); }
/* Beat `.vg a`'s link color when the button is an anchor */
.vg a.vg-btn { color: #fff; }
.vg a.vg-btn.secondary, .vg a.vg-btn.ghost { color: var(--vg-indigo); }
.vg a.vg-btn.secondary:hover { color: #fff; }
.vg-btn.secondary {
  background: transparent;
  color: var(--vg-indigo);
  border: 2px solid var(--vg-indigo);
  padding: 12px 26px;
}
.vg-btn.secondary:hover { background: var(--vg-indigo); color: #fff; }
.vg-btn.ghost {
  background: transparent;
  color: var(--vg-indigo);
  padding: 14px 8px;
}
.vg-btn.ghost:hover { text-decoration: underline; }

/* Status pills (radius 999 per the site pill style) */
.vg-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--vg-mid);
}
.vg-pill.active { background: var(--vg-green); }
.vg-pill.provisioned { background: var(--vg-mid); }
.vg-pill.trial { background: var(--vg-indigo); }
.vg-pill.suspended { background: var(--vg-red); }
.vg-pill.archived { background: #8a8f98; }

/* Form bits */
.vg input[type="text"], .vg input[type="email"] {
  font: 16px var(--vg-font);
  padding: 12px 14px;
  border: 1px solid var(--vg-card-bd);
  border-radius: 4px;
  width: 100%;
}
.vg label { font-size: 14px; color: var(--vg-mid); }
.vg .error { color: var(--vg-red); font-size: 14px; }
.vg .muted { color: var(--vg-mid); font-size: 14px; }

/* Tables */
.vg table { width: 100%; border-collapse: collapse; font-size: 15px; }
.vg th {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--vg-mid);
  padding: 8px 12px;
  border-bottom: 2px solid var(--vg-card-bd);
}
.vg td { padding: 12px; border-bottom: 1px solid var(--vg-card-bd); vertical-align: top; }

/* Footer: condensed VG site footer (indigo, white text) */
.vg-footer {
  background: var(--vg-indigo);
  color: #fff;
  text-align: center;
  padding: 20px 24px;
  font-size: 14px;
}
.vg-footer a { color: #fff; }

/* Centered single-card layouts (sign-in, TOTP) */
.vg-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.vg-center .vg-card { max-width: 440px; width: 100%; text-align: center; }

/* ── Control-Hub-style shell (O5, OWNER-CONSOLE §8b) ─────────────────────────
   Left nav rail + content pane, modeled on Webex Partner Hub / Control Hub so
   the layout absorbs future sections (analytics, locations, connector status)
   without a redesign. Rail = VG indigo; active item = teal edge. */
.vg-shell { display: flex; min-height: 100vh; flex: 1; align-items: stretch; }
.vg-nav {
  flex: 0 0 224px;
  background: var(--vg-indigo);
  color: #cfd2ee;
  display: flex;
  flex-direction: column;
  padding: 14px 0 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.vg-nav .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
}
.vg-nav .brand img { height: 34px; width: auto; background: #fff; border-radius: 6px; padding: 2px; }
.vg-nav .brand b { font-size: 14px; color: #fff; font-weight: 700; line-height: 1.2; display: block; }
.vg-nav .brand span { display: block; font-size: 10px; color: #cfd2ee; }
.vg-nav .sect {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #9ea3dd; padding: 12px 16px 4px;
}
.vg-nav a {
  display: flex; align-items: center; gap: 10px;
  color: #cfd2ee; text-decoration: none; font-size: 13px;
  padding: 9px 16px; border-left: 3px solid transparent; cursor: pointer;
}
.vg-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.vg-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: var(--vg-teal);
  color: #fff; font-weight: 600;
}
.vg-nav a .ic { width: 17px; text-align: center; opacity: 0.9; }
.vg-nav .spring { flex: 1; }
/* Bottom org indicator (Control Hub's current-org chip): partner level shows
   the company; drilled into an org it shows that org + acts as "back". */
.vg-nav .orgind {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px; font-size: 12px; color: #fff; cursor: pointer;
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.vg-nav .orgind:hover { background: rgba(255, 255, 255, 0.07); }
.vg-content { flex: 1; min-width: 0; padding: 26px 28px 40px; }
.vg-content .pagehead { font-size: 22px; font-weight: 700; color: var(--vg-indigo); margin: 0 0 2px; }
.vg-content .pagesub { font-size: 13px; color: var(--vg-mid); margin: 0 0 18px; line-height: 1.5; }
/* Submenu row across the top of a page (room for future sub-selections) */
.vg-subtabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 2px solid var(--vg-card-bd); }
.vg-subtabs button {
  background: none; border: none; font: 600 14px var(--vg-font);
  color: var(--vg-mid); padding: 8px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.vg-subtabs button.active { color: var(--vg-indigo); border-bottom-color: var(--vg-teal); }
@media (max-width: 760px) {
  .vg-shell { flex-direction: column; }
  .vg-nav { flex: none; height: auto; position: static; flex-direction: row; align-items: center; padding: 8px 10px; overflow-x: auto; }
  .vg-nav .brand { border-bottom: none; padding: 0 10px 0 4px; margin: 0; }
  .vg-nav .brand span, .vg-nav .sect, .vg-nav .spring, .vg-nav .orgind { display: none; }
  .vg-nav a { border-left: none; border-bottom: 3px solid transparent; padding: 8px 12px; white-space: nowrap; }
  .vg-nav a.active { border-left: none; border-bottom-color: var(--vg-teal); }
  .vg-content { padding: 18px 12px; }
}
