/* ============================================================
   Keystone Workspace Styles — FINAL CANONICAL HEADER
   DELTA: NAV ICON LOCK (7 ICONS ONLY)
   RULES:
   - Header is TOP BAR ONLY
   - NO sidebar rail
   - Icons use .nav-icon only
   - Hover = gold glow
   - Active = gold fill
   - NO blue / NO primary styling
============================================================ */

/* ========================= */
/* GLOBAL RESET              */
/* ========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  background: #0d0d0d;
  color: #e0e0e0;
}

/* ========================= */
/* ROOT WRAPPER              */
/* ========================= */

.keystone-workspace-root {
  height: 100dvh;
  width: 100vw;
  overflow: visible;
  background: #0d0d0d;
}

.workspace-frame {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* ========================= */
/* SIDEBAR / RAIL DISABLED   */
/* ========================= */

.workspace-rail {
  display: none !important;
}

/* ========================= */
/* MAIN CANVAS LAYOUT        */
/* ========================= */

.workspace-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 100px;
  height: calc(100dvh - 100px);
  overflow: visible;
}

/* ========================= */
/* TOP HEADER BAR            */
/* ========================= */

.workspace-canvas-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px 10px;

  background: linear-gradient(180deg, #161619 0%, #101013 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);

  z-index: 1000;
  flex-shrink: 0;
}

/* ========================= */
/* NAV ICON STRIP            */
/* ========================= */

.kw-header-nav {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

/* ============================================================
   NAV ICONS — GLASS TILE STYLE
============================================================ */

.nav-icon {
  width: 72px;
  height: 72px;

  border-radius: 16px;
  background: rgba(30, 30, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 4px;

  transition: all 0.22s ease;
  position: relative;
}

/* Hover Glow */

.nav-icon:hover {
  background: rgba(45, 45, 52, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Active State — Gold */

.nav-icon.active {
  background: linear-gradient(145deg, #d4af37 0%, #b8962e 100%);
  border-color: #d4af37;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.45), 0 0 30px rgba(212, 175, 55, 0.15);
}

/* Profile Variant — Blue tint */

.nav-icon--profile {
  background: linear-gradient(145deg, rgba(40, 50, 120, 0.6) 0%, rgba(30, 35, 80, 0.5) 100%);
  border-color: rgba(100, 120, 255, 0.2);
}

.nav-icon--profile:hover {
  background: linear-gradient(145deg, rgba(50, 60, 140, 0.75) 0%, rgba(35, 40, 100, 0.65) 100%);
  border-color: rgba(100, 120, 255, 0.35);
  box-shadow: 0 4px 20px rgba(80, 100, 220, 0.25);
}

.nav-icon--profile.active {
  background: linear-gradient(145deg, #4a5acf 0%, #3a48b0 100%);
  border-color: #5568e8;
  box-shadow: 0 4px 20px rgba(80, 100, 220, 0.45), 0 0 30px rgba(80, 100, 220, 0.15);
}

/* ============================================================
   SVG ICON STYLE
============================================================ */

.nav-icon svg {
  width: 28px;
  height: 28px;
  stroke: #999;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.18s ease;
  flex-shrink: 0;
}

/* Hover = lighter */

.nav-icon:hover svg {
  stroke: #d4af37;
}

/* Active = dark */

.nav-icon.active svg {
  stroke: #1a1a1a;
}

/* Profile active SVG */

.nav-icon--profile.active svg {
  stroke: #fff;
}

/* ============================================================
   NAV LABELS
============================================================ */

.nav-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(180, 180, 190, 0.7);
  text-align: center;
  line-height: 1.15;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nav-icon:hover .nav-label {
  color: rgba(212, 175, 55, 0.9);
}

.nav-icon.active .nav-label {
  color: #1a1a1a;
  font-weight: 600;
}

.nav-icon--profile .nav-label {
  color: rgba(160, 170, 230, 0.75);
}

.nav-icon--profile:hover .nav-label {
  color: rgba(140, 160, 255, 0.95);
}

.nav-icon--profile.active .nav-label {
  color: #fff;
}

/* ============================================================
   FOUNDER CONTROL ROOM DIVIDER
============================================================ */

.nav-icon-founder {
  display: none; /* Hidden by default, toggled by JS */
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(212, 175, 55, 0.25);
}

/* ============================================================
   TOOLTIP DISABLED (FROZEN)
============================================================ */

.nav-tooltip {
  display: none !important;
}

/* ========================= */
/* WORKSPACE BODY + IFRAME   */
/* ========================= */

.workspace-canvas-body {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  position: relative;
  background: #0d0d0d;
}

#workspace-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #0d0d0d;
}

/* ========================= */
/* MOBILE RESPONSIVE         */
/* ========================= */

@media (max-width: 768px) {
  .workspace-canvas-header {
    padding: 10px 8px 6px;
    overflow-x: auto;
  }

  .nav-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 13px;
    padding: 6px 3px 3px;
  }

  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .nav-label {
    font-size: 7px;
  }

  .kw-header-nav {
    gap: 8px;
  }
}
/* STEP 7 — Scroll fix for all asset/device pages */
.asset-page, .device-page, .workspace-view {
  height: 100%;
  overflow-y: auto;
}

/* STEP 8 — Remove desktop sidebar + force full width */
.sidebar {
  display: none !important;
}

.workspace-shell {
  width: 100% !important;
  max-width: 100% !important;
}
