/*
 * Grace MSP Cloud Console — shared suite shell.
 *
 * Canonical copy: gmsp.cloud site-files/assets/suite.css. Identical copies are
 * served by CertMaster, Password Security and Domain OSINT because each host's
 * CSP only allows same-origin styles. Change this file here, then copy it.
 * Every selector is prefixed with gm- so service stylesheets cannot collide.
 */
:root {
  --gm-bg: #0b0f17;
  --gm-bg-raised: #0e131d;
  --gm-surface: #121926;
  --gm-surface-2: #182031;
  --gm-line: #222c3e;
  --gm-line-strong: #313d55;
  --gm-text: #e9eef7;
  --gm-text-2: #c3cbdb;
  --gm-muted: #8f9bb3;
  --gm-subtle: #67738c;
  --gm-accent: #7565f0;
  --gm-accent-hover: #8576ff;
  --gm-accent-text: #aea4ff;
  --gm-accent-soft: rgba(117, 101, 240, .14);
  --gm-good: #3fcf8e;
  --gm-warn: #f2c14e;
  --gm-orange: #f39b4b;
  --gm-bad: #ff6b7a;
  --gm-info: #6aa8ff;
  --gm-radius: 12px;
  --gm-radius-sm: 8px;
  --gm-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gm-bar-h: 56px;
  --gm-max: 1440px;
  color-scheme: dark;
}

.gm-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--gm-radius-sm);
  background: var(--gm-accent);
  color: #fff;
  font: 600 13px/1.4 var(--gm-font);
  text-decoration: none;
}
.gm-skip:focus { top: 10px; }

/* Suite bar ---------------------------------------------------------------- */
.gm-suitebar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--gm-bar-h);
  border-bottom: 1px solid var(--gm-line);
  background: rgba(10, 13, 21, .94);
  backdrop-filter: blur(14px);
  color: var(--gm-text);
  font: 14px/1.4 var(--gm-font);
  letter-spacing: normal;
  text-transform: none;
}
.gm-suitebar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: var(--gm-max);
  margin: 0 auto;
  padding: 0 24px;
}
.gm-suitebar a { color: inherit; text-decoration: none; }
.gm-suitebar svg { position: static; inset: auto; width: 16px; height: 16px; flex: none; }

.gm-brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--gm-text); }
.gm-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, #8a7cff, #5a46e0);
  color: #fff;
  font: 800 15px/1 var(--gm-font);
  letter-spacing: 0;
}
.gm-brand__text strong { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.gm-brand__text small { display: block; margin-top: 1px; color: var(--gm-muted); font-size: 11px; }
.gm-brand:hover .gm-brand__text small { color: var(--gm-text-2); }

.gm-crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gm-crumbs > span[aria-hidden] { color: var(--gm-line-strong); font-size: 20px; font-weight: 300; }
.gm-crumbs a, .gm-crumbs strong {
  overflow: hidden;
  color: var(--gm-text);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gm-crumbs a { color: var(--gm-text-2); font-weight: 550; }
.gm-crumbs a:hover { color: var(--gm-text); }

.gm-suitebar__end { display: flex; align-items: center; gap: 14px; margin-left: auto; color: var(--gm-muted); font-size: 12px; }
.gm-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.gm-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gm-good);
  box-shadow: 0 0 0 4px rgba(63, 207, 142, .12);
}
.gm-status.is-warn::before { background: var(--gm-warn); box-shadow: 0 0 0 4px rgba(242, 193, 78, .12); }
.gm-status.is-muted::before { background: var(--gm-subtle); box-shadow: none; }
.gm-divider { width: 1px; height: 18px; background: var(--gm-line); }
.gm-clock { color: var(--gm-text-2); font: 12px var(--gm-mono); white-space: nowrap; }

.gm-user { display: flex; align-items: center; gap: 10px; }
.gm-user__avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gm-surface-2);
  color: var(--gm-text-2);
  font: 800 10px/1 var(--gm-font);
}
.gm-user__name { color: var(--gm-text-2); font-size: 12px; font-weight: 600; }
.gm-user form { margin: 0; }
.gm-signout {
  height: 30px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid var(--gm-line);
  border-radius: var(--gm-radius-sm);
  background: transparent;
  color: var(--gm-muted);
  font: 600 12px/1 var(--gm-font);
  cursor: pointer;
}
.gm-signout:hover { border-color: rgba(255, 107, 122, .45); color: #ffb3bc; }

/* Services switcher -------------------------------------------------------- */
.gm-switch { position: relative; flex: none; }
.gm-switch__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  margin: 0 0 0 6px;
  padding: 0 11px;
  border: 1px solid var(--gm-line);
  border-radius: var(--gm-radius-sm);
  background: var(--gm-bg-raised);
  color: var(--gm-text-2);
  font: 600 12px/1 var(--gm-font);
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}
.gm-switch__button:hover, .gm-switch__button[aria-expanded="true"] { border-color: var(--gm-line-strong); background: var(--gm-surface-2); color: var(--gm-text); }
.gm-switch__button svg { width: 14px; height: 14px; }
.gm-switch__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  width: min(880px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--gm-line-strong);
  border-radius: var(--gm-radius);
  background: #0f1420;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.gm-switch__panel[hidden] { display: none; }
.gm-switch__group { min-width: 0; }
.gm-switch__label {
  margin: 6px 10px 6px;
  color: var(--gm-subtle);
  font: 700 10px/1.3 var(--gm-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gm-switch__item {
  position: relative;
  display: block;
  padding: 8px 28px 8px 10px;
  border-radius: var(--gm-radius-sm);
  color: var(--gm-text);
}
.gm-switch__item strong { display: block; font-size: 13px; font-weight: 650; }
.gm-switch__item span { display: block; margin-top: 1px; color: var(--gm-muted); font-size: 11.5px; line-height: 1.35; }
.gm-switch__item em { position: absolute; top: 8px; right: 10px; color: var(--gm-subtle); font-style: normal; font-size: 12px; }
.gm-switch__item:hover, .gm-switch__item:focus-visible { background: var(--gm-surface-2); }
.gm-switch__item[aria-current="page"] { background: var(--gm-accent-soft); }
.gm-switch__item[aria-current="page"] strong { color: var(--gm-accent-text); }
.gm-switch__foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 12px 10px 2px;
  border-top: 1px solid var(--gm-line);
  color: var(--gm-subtle);
  font-size: 11.5px;
}
.gm-switch__foot a { color: var(--gm-accent-text); font-weight: 600; }

/* Local section tabs (multi-page services) --------------------------------- */
.gm-tabs {
  border-bottom: 1px solid var(--gm-line);
  background: var(--gm-bg);
  font: 13px/1.4 var(--gm-font);
}
.gm-tabs__inner { display: flex; gap: 4px; max-width: var(--gm-max); margin: 0 auto; padding: 0 24px; overflow-x: auto; }
.gm-tabs a {
  padding: 12px 12px 11px;
  border-bottom: 2px solid transparent;
  color: var(--gm-muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.gm-tabs a:hover { color: var(--gm-text); }
.gm-tabs a[aria-current="page"] { border-bottom-color: var(--gm-accent); color: var(--gm-text); }

/* Page header and footer --------------------------------------------------- */
.gm-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 26px;
  font-family: var(--gm-font);
}
.gm-eyebrow {
  margin: 0 0 8px;
  color: var(--gm-accent-text);
  font: 700 11px/1.3 var(--gm-font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gm-page-head h1 {
  margin: 0;
  color: var(--gm-text);
  font: 700 30px/1.15 var(--gm-font);
  letter-spacing: -.02em;
}
.gm-page-head__lede { max-width: 72ch; margin: 8px 0 0; color: var(--gm-muted); font-size: 14px; line-height: 1.55; }
.gm-page-head__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; color: var(--gm-muted); font-size: 12px; }

.gm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--gm-line-strong);
  border-radius: var(--gm-radius-sm);
  background: var(--gm-surface-2);
  color: var(--gm-text);
  font: 600 12.5px/1 var(--gm-font);
  text-decoration: none;
  cursor: pointer;
}
.gm-btn:hover { border-color: #46557a; background: #1d2639; }
.gm-btn:disabled { opacity: .6; cursor: wait; }
.gm-btn--primary { border-color: transparent; background: var(--gm-accent); color: #fff; }
.gm-btn--primary:hover { border-color: transparent; background: var(--gm-accent-hover); }

.gm-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 40px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--gm-line);
  color: var(--gm-subtle);
  font: 12px/1.5 var(--gm-font);
}
.gm-footer a { color: var(--gm-muted); }

.gm-suitebar :focus-visible, .gm-tabs :focus-visible, .gm-btn:focus-visible {
  outline: 2px solid var(--gm-accent-text);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .gm-switch__panel { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .gm-brand__text { display: none; }
  .gm-suitebar__end .gm-hide-sm { display: none; }
}
@media (max-width: 640px) {
  .gm-suitebar__inner, .gm-tabs__inner { padding: 0 14px; }
  .gm-switch { position: static; }
  .gm-switch__panel {
    position: fixed;
    top: calc(var(--gm-bar-h) + 6px);
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - var(--gm-bar-h) - 16px);
    overflow-y: auto;
    grid-template-columns: 1fr;
  }
  .gm-page-head { flex-direction: column; align-items: flex-start; padding: 24px 0 20px; }
  .gm-page-head h1 { font-size: 25px; }
  .gm-page-head__actions { justify-content: flex-start; }
  .gm-user__name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gm-suitebar *, .gm-tabs * { transition: none !important; }
}
