/* Geovantage console — shell chrome (rail, topbar, content).
   Brand tokens match the existing platform (geovantage/brand.css) so the
   embedded explorer and the new console pages read as one product. */
:root{
  --red:#e42544; --red-dim:#c61f3a; --red-bg:#fff1f3;
  --ink:#17151a; --ink-2:#3c363f; --muted:#6d6569; --soft:#9a9298;
  --bg:#ffffff; --bg-soft:#f7f6f7; --bg-sunk:#efedf0;
  --line:#e6e2e6; --line-2:#d3ccd3;
  --ok:#146050; --ok-bg:#eaf5f1;
  --warn:#7d5a10; --warn-bg:#fdf4e3;
  --rail-w:236px; --topbar-h:56px;
  --radius:10px;
  --mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,monospace;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body.gvc{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;
  color:var(--ink); background:var(--bg-soft); line-height:1.5;
}
button,input,select{font-family:inherit}
a{color:inherit;text-decoration:none}

/* ── layout ─────────────────────────────────────────────── */
.gvc-shell{display:grid;grid-template-columns:var(--rail-w) minmax(0,1fr);min-height:100%}
.gvc-main{display:flex;flex-direction:column;min-width:0}
.gvc-content{padding:26px 30px 60px;flex:1;min-width:0}
.gvc-content--flush{padding:0}

/* ── rail ───────────────────────────────────────────────── */
.gvc-rail{
  background:var(--bg); border-right:1px solid var(--line);
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh;
}
.gvc-brand{
  display:flex;align-items:center;gap:10px;
  height:var(--topbar-h);padding:0 18px;border-bottom:1px solid var(--line);
  font-weight:700;letter-spacing:-.02em;flex:none;
}
.gvc-brand__dot{
  width:20px;height:20px;border-radius:6px;background:var(--red);
  position:relative;flex:none;box-shadow:inset 0 -2px 0 rgba(0,0,0,.12);
}
.gvc-brand__dot::after{content:'';position:absolute;inset:5px;border:2px solid #fff;border-radius:2px}
.gvc-nav{padding:12px 10px;overflow-y:auto;flex:1}
.gvc-nav__label{
  font-size:10.5px;letter-spacing:.11em;text-transform:uppercase;
  color:var(--soft);padding:14px 10px 6px;font-weight:600;
}
.gvc-nav__item{
  display:flex;align-items:center;gap:11px;
  padding:8px 10px;border-radius:8px;font-size:14px;font-weight:500;
  color:var(--ink-2);transition:background .12s,color .12s;
}
.gvc-nav__item svg{width:18px;height:18px;flex:none;fill:currentColor;opacity:.72}
.gvc-nav__item:hover{background:var(--bg-sunk);color:var(--ink)}
.gvc-nav__item.is-on{background:var(--red-bg);color:var(--red-dim);font-weight:600}
.gvc-nav__item.is-on svg{opacity:1}
.gvc-nav__item:focus-visible{outline:2px solid var(--red);outline-offset:1px}
.gvc-nav__item--off{color:var(--soft);cursor:default}
.gvc-nav__item--off:hover{background:none;color:var(--soft)}
.gvc-nav__note{
  margin-left:auto;font-family:var(--mono);font-size:9.5px;
  letter-spacing:.04em;color:var(--soft);
  background:var(--bg-sunk);padding:2px 5px;border-radius:3px;
}

/* ── topbar ─────────────────────────────────────────────── */
.gvc-topbar{
  height:var(--topbar-h);flex:none;background:var(--bg);
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:16px;padding:0 30px;
  position:sticky;top:0;z-index:20;
}
.gvc-topbar__title{font-size:15px;font-weight:600;letter-spacing:-.01em}
.gvc-crumb{font-size:13px;color:var(--muted)}
.gvc-crumb a:hover{color:var(--red-dim);text-decoration:underline}
.gvc-topbar__right{margin-left:auto;display:flex;align-items:center;gap:14px}
.gvc-who{font-size:13px;color:var(--muted)}
.gvc-who b{color:var(--ink);font-weight:600}
.gvc-role{
  font-family:var(--mono);font-size:10px;text-transform:uppercase;
  letter-spacing:.06em;padding:2px 6px;border-radius:3px;
  background:var(--bg-sunk);color:var(--muted);
}
.gvc-role--admin{background:var(--red-bg);color:var(--red-dim)}

/* ── page furniture ─────────────────────────────────────── */
.gvc-head{margin-bottom:22px}
.gvc-h1{font-size:23px;font-weight:700;letter-spacing:-.022em;margin-bottom:5px}
.gvc-sub{font-size:14px;color:var(--muted);max-width:70ch}
.gvc-section{margin-top:32px}
.gvc-h2{font-size:15px;font-weight:600;letter-spacing:-.01em;margin-bottom:12px}

.gvc-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.gvc-card{
  background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px 18px;
}
.gvc-card__label{
  font-size:11px;letter-spacing:.07em;text-transform:uppercase;
  color:var(--muted);font-weight:600;margin-bottom:8px;
}
.gvc-card__value{font-size:28px;font-weight:700;letter-spacing:-.03em;line-height:1;font-variant-numeric:tabular-nums}
.gvc-card__foot{font-size:12.5px;color:var(--muted);margin-top:7px}

.gvc-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.gvc-tile{
  background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px 18px;display:flex;flex-direction:column;gap:6px;
  transition:border-color .14s,box-shadow .14s;
}
a.gvc-tile:hover{border-color:var(--line-2);box-shadow:0 3px 12px rgba(0,0,0,.05)}
.gvc-tile__name{font-size:15px;font-weight:600;letter-spacing:-.01em}
.gvc-tile__client{font-size:12.5px;color:var(--muted)}
.gvc-tile__meta{
  font-family:var(--mono);font-size:11px;color:var(--muted);
  margin-top:6px;padding-top:9px;border-top:1px solid var(--line);
}

table.gvc-table{width:100%;border-collapse:collapse;font-size:13.5px;background:var(--bg)}
.gvc-tablewrap{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.gvc-scroll{overflow-x:auto}
.gvc-table th{
  text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);font-weight:600;padding:10px 14px;
  background:var(--bg-soft);border-bottom:1px solid var(--line);white-space:nowrap;
}
.gvc-table td{padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.gvc-table tbody tr:last-child td{border-bottom:0}
.gvc-table tbody tr:hover{background:var(--bg-soft)}
.gvc-table .num{font-variant-numeric:tabular-nums;text-align:right}
.gvc-link{color:var(--red-dim);font-weight:500}
.gvc-link:hover{text-decoration:underline}

.gvc-chip{
  display:inline-block;font-family:var(--mono);font-size:10px;
  letter-spacing:.05em;text-transform:uppercase;padding:2px 6px;border-radius:3px;
  background:var(--bg-sunk);color:var(--muted);white-space:nowrap;
}
.gvc-chip--ok{background:var(--ok-bg);color:var(--ok)}
.gvc-chip--warn{background:var(--warn-bg);color:var(--warn)}
.gvc-chip--bad{background:var(--red-bg);color:var(--red-dim)}

.gvc-btn{
  display:inline-flex;align-items:center;gap:8px;justify-content:center;
  padding:9px 16px;border:none;border-radius:8px;background:var(--red);color:#fff;
  font-size:14px;font-weight:600;cursor:pointer;transition:background .13s;
}
.gvc-btn:hover{background:var(--red-dim)}
.gvc-btn:disabled{background:var(--line-2);cursor:not-allowed}
.gvc-btn--ghost{background:var(--bg);color:var(--ink-2);border:1px solid var(--line-2)}
.gvc-btn--ghost:hover{background:var(--bg-sunk)}
.gvc-btn:focus-visible{outline:2px solid var(--red);outline-offset:2px}

.gvc-empty{
  background:var(--bg);border:1px dashed var(--line-2);border-radius:var(--radius);
  padding:34px 24px;text-align:center;color:var(--muted);font-size:14px;
}
.gvc-empty b{display:block;color:var(--ink);font-size:15px;font-weight:600;margin-bottom:5px}

.gvc-note{
  background:var(--warn-bg);border:1px solid rgba(125,90,16,.22);
  border-radius:var(--radius);padding:13px 16px;font-size:13.5px;color:var(--ink-2);
}
.gvc-note b{font-weight:600}

/* ── forms ──────────────────────────────────────────────── */
.gvc-form{max-width:520px;display:flex;flex-direction:column;gap:16px}
.gvc-field{display:flex;flex-direction:column;gap:6px}
.gvc-field label{font-size:13px;font-weight:600}
.gvc-field__hint{font-size:12.5px;color:var(--muted)}
.gvc-field input,.gvc-field select{
  padding:10px 13px;border:1.5px solid var(--line-2);border-radius:8px;
  font-size:14.5px;color:var(--ink);background:var(--bg);outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.gvc-field input:focus,.gvc-field select:focus{
  border-color:var(--red);box-shadow:0 0 0 3px rgba(228,37,68,.12);
}

/* ── embedded explorer ──────────────────────────────────── */
/* The legacy portfolio/detail app renders full-bleed inside the content area.
   It brings its own stylesheet; this only gives it a viewport to live in. */
.gvc-explorer{position:relative;min-height:calc(100vh - var(--topbar-h))}

@media (max-width:900px){
  :root{--rail-w:0px}
  .gvc-shell{grid-template-columns:1fr}
  .gvc-rail{display:none}
  .gvc-content{padding:20px 16px 48px}
  .gvc-topbar{padding:0 16px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ── containing the embedded explorer ───────────────────────────────────────
   The explorer was built as a full-viewport app: `.gv-view` is position:fixed
   with inset:0, and a few panels size themselves in vw. Inside the console it
   has to live in the content area instead.

   The transform below is doing real work: it makes .gvc-explorer a containing
   block for its position:fixed descendants, so every fixed panel resolves
   against this box rather than the viewport. That contains them all at once
   without editing brand.css, which the offline export still renders full-screen. */
.gvc-explorer{transform:translateZ(0)}
.gvc-explorer .gv-view{position:absolute}
/* Viewport-relative widths must become box-relative. The detail view splits
   itself 50vw/50vw, which assumes it owns the whole window; inside the console
   it owns the content area, so the halves have to be 50% of *this* box or the
   tiles panel hangs off the right edge by the width of the rail. Both halves
   must be converted — fixing only one leaves the same overflow. */
.gvc-explorer .gv-detail__maps,
.gvc-explorer .gv-detail__tiles{width:50%}
/* The console owns the chrome: the explorer's own topbars would duplicate the
   brand, the account and the sign-out control. The detail view's bar is kept —
   it carries the in-app back/section navigation, not account chrome. */
.gvc-explorer .gv-workspace .gv-topbar,
.gvc-explorer .gv-portfolio__bar .gv-logo,
.gvc-explorer .gv-portfolio__bar .gv-account,
.gvc-explorer .gv-portfolio__bar .gv-zao,
.gvc-explorer .gv-detail__bar .gv-account,
.gvc-explorer .gv-detail__bar .gv-zao{display:none}
