/* Spark Studio · 4r Consultancy — portal shell (header, hero, services, panels, dropdowns, subnav, 17G assistant) */
:root {
  --p-ink: #0f1c3f;
  --p-ink-2: #41506f;
  --p-muted: #6a7794;
  --p-line: #dbe3f0;
  --p-canvas: #f2f6fc;
  --p-navy: #101e5e;
  --p-blue: #1764ff;
  --p-blue-ink: #173a9a;
  --p-green: #087b63;
  --p-green-bg: #e6f7f2;
  --p-shadow: 0 16px 40px rgba(20, 37, 84, .08);
  --p-radius: 16px;
  font-family: Inter, Aptos, "Segoe UI", Roboto, Arial, sans-serif;
}
html, body { margin: 0; background: var(--p-canvas); color: var(--p-ink); font-synthesis: none; }
button, select, input { font: inherit; }
a { color: var(--p-blue); }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% -10%, rgba(81, 68, 226, .10), transparent 26rem),
    linear-gradient(180deg, #f9fbff 0, var(--p-canvas) 22rem);
}
body, button, select, input { font: inherit; }
.skip-link { position: fixed; top: -4rem; left: 1rem; z-index: 99; background: var(--p-ink); color: #fff; padding: .75rem 1rem; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ===================== GLOBAL HEADER (matches screenshot) ===================== */
.portal-header {
  position: sticky; top: 0; z-index: 30;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  background: #fff;
  border-bottom: 1px solid var(--p-line);
  box-shadow: 0 6px 18px rgba(20, 37, 84, .05);
}
.portal-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--p-blue), #4b43dc);
  color: #fff; font-weight: 800; font-size: 17px;
  position: relative; overflow: hidden;
}
.brand-mark-top { position: absolute; top: 2px; left: 5px; font-size: 15px; }
.brand-mark-bottom { position: absolute; bottom: 0px; right: 5px; font-size: 13px; font-weight: 600; opacity: .85; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.03em; color: var(--p-navy); white-space: nowrap; }
.product-name { font-size: 14px; font-weight: 600; color: var(--p-muted); border-left: 1px solid var(--p-line); padding-left: 12px; white-space: nowrap; }
.portal-nav { display: flex; align-items: center; gap: 4px; }
.nav-tab {
  border: 0; background: transparent; color: var(--p-ink-2);
  font-size: 14px; font-weight: 650;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s ease, color .15s ease;
  cursor: pointer; white-space: nowrap;
}
.nav-tab:hover { background: #f0f5ff; color: var(--p-blue-ink); }
.nav-tab.active { background: #0f1c3f; color: #fff; }
.nav-tab[data-page="planner"].active { background: var(--p-blue); color: #fff; }
.caret { font-size: 10px; opacity: .8; }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 250px;
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px;
  box-shadow: var(--p-shadow); padding: 8px;
  display: none; z-index: 40;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: var(--p-ink); text-decoration: none; font-size: 14px; font-weight: 600;
}
.dropdown-menu a:hover { background: #f0f5ff; color: var(--p-blue-ink); }
.dropdown-menu a.dropdown-divider { border-top: 1px solid var(--p-line); margin-top: 6px; padding-top: 14px; }

/* ===================== MAIN / PAGES ===================== */
.portal-main { max-width: 1440px; margin: 0 auto; padding: 26px clamp(18px, 3vw, 48px) 40px; }
.page { min-height: 60vh; }
.page[hidden] { display: none; }
.page h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.03em; }
.panel { background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); box-shadow: var(--p-shadow); padding: 30px; }
.panel-note { color: var(--p-ink-2); margin: 0 0 18px; font-size: 15px; }
.portal-footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--p-line); color: var(--p-muted); font-size: 12px; }

/* ===================== PLANNER SURFACE (chrome + subnav) ===================== */
.planner-surface { background: transparent; }
.studio-chrome {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 24px 28px; margin-bottom: 20px;
  background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); box-shadow: var(--p-shadow);
}
.studio-chrome .kicker { color: var(--p-blue); font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.studio-title { margin: 5px 0 6px; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.03em; color: #121d3a; }
.studio-sub { margin: 0; color: var(--p-ink-2); font-size: 15px; max-width: 720px; }
.studio-chrome-right { display: flex; align-items: center; gap: 18px; }
/* suite icon-button + mode-switch reused; override colors for white chrome */
.planner-surface .icon-button { border: 1px solid var(--p-line); color: var(--p-ink); background: #fff; min-height: 38px; border-radius: 11px; padding: 0 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.planner-surface .icon-button > span:first-child { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 1px solid var(--p-blue); color: var(--p-blue); font: 700 12px Georgia, serif; }
.planner-surface .mode-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--p-ink-2); white-space: nowrap; }
.planner-surface .mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.planner-surface .switch-track { width: 40px; height: 22px; padding: 3px; border-radius: 999px; background: #cfd9ea; transition: .2s ease; }
.planner-surface .switch-track span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s ease; }
.planner-surface .mode-switch input:checked + .switch-track { background: var(--p-blue); }
.planner-surface .mode-switch input:checked + .switch-track span { transform: translateX(18px); }

.subnav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.subnav-item {
  border: 1px solid var(--p-line); background: #fff; color: var(--p-ink);
  padding: 13px 16px; border-radius: 14px; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center;
  transition: .16s ease; box-shadow: 0 4px 14px rgba(20,37,84,.04);
}
.subnav-item:hover { border-color: #b7c9ec; }
.subnav-item.active { border-color: var(--p-blue); background: linear-gradient(90deg, #eef4ff, #f4f0ff); box-shadow: inset 3px 0 var(--p-blue); }
.subnav-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #d8e3f5; border-radius: 11px; background: #fff; color: var(--p-blue); font-size: 20px; font-weight: 700; }
.subnav-item.active .subnav-icon { border-color: var(--p-blue); }
.subnav-item b { display: block; font-size: 15px; }
.subnav-item small { display: block; margin-top: 2px; color: var(--p-muted); font-size: 12px; }

#studio-main-wrap { background: transparent; }
.planner-surface .studio-main { padding: 0 0 40px; }
.planner-surface .view { max-width: none; }
/* suite dialog lives inside planner-surface; keep its own styling via scoped css. */

/* ===================== TOOLS / MANAGE index ===================== */
.tools-index { display: grid; gap: 12px; }
.tool-link {
  display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--p-line); border-radius: 14px;
  background: #fbfdff; text-decoration: none; transition: border-color .15s ease, background .15s ease;
}
.tool-link:hover { border-color: #b7c9ec; background: #f3f8ff; }
.tool-link b { color: var(--p-navy); font-size: 15px; }
.tool-link span { color: var(--p-muted); font-size: 13px; }

/* ===================== HARDWARE TABLE ===================== */
.hardware-table-wrap { overflow-x: auto; border: 1px solid var(--p-line); border-radius: 14px; box-shadow: var(--p-shadow); }
.hardware-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.hardware-table th { padding: 13px 14px; color: #68758e; background: #f7f9fd; border-bottom: 1px solid var(--p-line); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.hardware-table td { padding: 14px; border-bottom: 1px solid #e7edf5; font-size: 13px; vertical-align: middle; }
.hardware-table tr:last-child td { border-bottom: 0; }
.hardware-table td b { font-size: 14px; display: block; }
.hardware-table td small { display: block; margin-top: 3px; color: var(--p-muted); font-size: 11px; }
.planner-surface .stage-chip, .stage-chip { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; color: #174dbf; background: #e9f0ff; font-size: 11px; font-weight: 850; white-space: nowrap; }

/* ===================== 17G SPEC ASSISTANT ===================== */
.spec-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.spec-group { display: grid; gap: 7px; padding: 14px; border: 1px solid var(--p-line); border-radius: 13px; background: #fbfdff; }
.spec-label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--p-blue-ink); }
.spec-group select { width: 100%; min-height: 44px; border: 1px solid #ccd6e6; border-radius: 11px; background: #fff; color: var(--p-ink); padding: 0 12px; font-size: 14px; }
.spec-sheet { border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; background: #fff; }
.spec-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #eef2f9; }
.spec-row:last-of-type { border-bottom: 0; }
.spec-row span { color: var(--p-muted); font-size: 13px; font-weight: 700; }
.spec-row b { font-size: 14px; color: var(--p-ink); }
.spec-note { margin: 0; padding: 13px 16px; background: #f4f8ff; color: var(--p-ink-2); font-size: 13px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
  .portal-nav { overflow-x: auto; }
  .subnav { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .portal-header { height: auto; min-height: 64px; padding: 10px 16px; flex-wrap: wrap; }
  .product-name { display: none; }
  .nav-tab { padding: 0 10px; font-size: 13px; }
  .studio-chrome { flex-direction: column; }
  .subnav { grid-template-columns: 1fr; }
  .tool-link { grid-template-columns: 1fr; }
  .spec-form { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
}
