/* =========================================
   HELIXOS APP SHELL
========================================= */

.helix-shell {
  position: fixed;
  inset: 0;
  background: #ffffff;
  color: #111;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

.helix-shell *,
.helix-shell *::before,
.helix-shell *::after {
  box-sizing: border-box;
}

/* =========================================
   TOP BAR
========================================= */

.helix-shell-topbar {
  height: 64px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, #1a1a1a, #101010);
  position: relative;
}

.helix-shell-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* =========================================
   MOBILE MENU BUTTON
========================================= */

.helix-shell-menu-btn {
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
  margin-right: 12px;
  padding: 0;
}

.helix-shell-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #f2f2f2;
  border-radius: 2px;
}

/* =========================================
   BRAND
========================================= */

.helix-shell-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.helix-shell-brand-helix {
  color: #ffffff;
}

.helix-shell-brand-os {
  color: #f09c3a;
  margin-left: 4px;
}

.helix-shell-topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.helix-shell-topbar-pill {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8b8b8b;
}

/* =========================================
   USER INFO
========================================= */


.helix-shell-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.helix-shell-user-meta {
  text-align: right;
  min-width: 0;
}

.helix-shell-user-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.helix-shell-user-company {
  font-size: 12px;
  color: rgba(255,255,255,0.58);
  white-space: nowrap;
  line-height: 1.2;
  margin-top: 2px;
}

/* =========================================
   LOGOUT BUTTON
========================================= */

.helix-shell-logout-btn {
  min-width: 108px;
  height: 44px;

  border-radius: 12px;
  border: none;

  background: #f09c3a;
  color: #fff;

  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 6px 14px rgba(240,156,58,0.25);
}

.helix-shell-logout-btn:hover {
  background: #e08f2f;
}

.helix-shell-logout-btn:active {
  transform: translateY(1px);
}

/* =========================================
   BODY LAYOUT
========================================= */

.helix-shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #ffffff;
}

/* =========================================
   SIDEBAR
========================================= */

.helix-shell-sidebar {
  width: 262px;
  min-width: 262px;
  background: linear-gradient(180deg, #f6f6f7 0%, #f2f3f5 100%);
  border-right: 1px solid rgba(0,0,0,0.07);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.72);
  padding: 14px 12px 12px;
  overflow: hidden;
}

.helix-shell-sidebar-title {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #7f8792;
  margin-bottom: 10px;
}

/* =========================================
   NAV
========================================= */

.helix-shell-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.helix-shell-nav-item {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,255,255,0.82);
  color: #111;
  border-radius: 13px;
  padding: 0 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.helix-shell-nav-item:hover {
  border-color: rgba(240,156,58,0.20);
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

.helix-shell-nav-item-active {
  background: linear-gradient(180deg, #e1ab60 0%, #d69b4f 100%);
  color: #fff;
  border-color: #d69b4f;
  box-shadow: 0 8px 18px rgba(217,160,85,0.16);
}

/* =========================================
   WORKSPACE
========================================= */

.helix-shell-workspace {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, #eceff3 0%, #f3f5f8 100%);
  padding: 34px 38px 28px;
  overflow: auto;
}

/* =========================================
   WORKSPACE CONTENT
========================================= */

.helix-workspace-home {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.helix-workspace-eyebrow {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8b8b8b;
  margin-bottom: 24px;
}

.helix-workspace-title {
  margin: 0;
  font-size: 64px;
  font-weight: 800;
  color: #111;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.helix-workspace-subtitle {
  margin-top: 20px;
  font-size: 24px;
  line-height: 1.45;
  color: #666;
}

.helix-launcher-view .helix-workspace-eyebrow {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: #8a9099;
}

.helix-launcher-view .helix-workspace-title {
  font-size: 42px;
  margin-bottom: 8px;
  line-height: 1.05;
}

.helix-launcher-view .helix-workspace-subtitle {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 16px;
  color: #68707c;
}

/* =========================================
   DASHBOARD GRID
========================================= */

.helix-workspace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 22px;
}

/* =========================================
   CARDS
========================================= */

.helix-workspace-card {
  background: linear-gradient(180deg, rgba(31,32,38,0.96), rgba(21,22,28,0.96));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 24px;
  min-height: 150px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.helix-workspace-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.helix-workspace-card-text {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
}

/* =========================================
   SUBMODULE LAUNCHER
========================================= */

.helix-submodule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 10px;
}

.helix-submodule-tile {
  min-height: 112px;

  border-radius: 20px;

  border: 1px solid rgba(255,255,255,0.06);

  background: linear-gradient(
    180deg,
    #1a1a1a 0%,
    #101010 100%
  );

  color: #e8e8e8;

  padding: 18px 20px;

  text-align: left;
  cursor: pointer;

  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;

  box-shadow:
    0 14px 32px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.04);

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;

  position: relative;
  overflow: hidden;
}

.helix-submodule-tile::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at top center,
      rgba(240,156,58,0.15),
      transparent 55%
    );

  opacity: 0.35;
  pointer-events: none;
}

.helix-submodule-tile:hover {
  transform: translateY(-3px);

  border-color: rgba(255,255,255,0.14);

  box-shadow:
    0 20px 40px rgba(0,0,0,0.75);
}

.helix-submodule-tile-icon {
  width: 40px;
  height: 40px;

  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.08);

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  color: #ffffff;

  font-weight: 700;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 4px 12px rgba(0,0,0,0.4);
}

.helix-submodule-tile-title {
  font-size: 16px;
  font-weight: 700;
  color: #e8e8e8;
}

.helix-submodule-tile-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
  position: relative;
  z-index: 1;
}

/* =========================================
   TOOL VIEW
========================================= */

.helix-tool-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.helix-tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.helix-tool-back-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #ffffff;
  color: #111;
  cursor: pointer;
  font-weight: 700;
}

.helix-tool-back-btn:hover {
  background: #f8f8f9;
  border-color: rgba(240,156,58,0.18);
}

.helix-tool-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.helix-tool-body {
  min-height: 300px;
}

/* =========================================
   MODULE PLACEHOLDER
========================================= */

.helix-module-placeholder {
  max-width: 800px;
}

/* =========================================
   MOBILE OVERLAY
========================================= */

.helix-shell-mobile-overlay {
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 15;
}

.helix-shell-menu-open .helix-shell-mobile-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================
   SCROLLBAR
========================================= */

.helix-shell-workspace::-webkit-scrollbar,
.helix-shell-sidebar::-webkit-scrollbar {
  width: 8px;
}

.helix-shell-workspace::-webkit-scrollbar-thumb,
.helix-shell-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
}

.helix-shell-workspace::-webkit-scrollbar-track,
.helix-shell-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================
   LOGOUT DIVIDER
========================================= */
.helix-shell-nav-divider {
  height: 1px;
  margin: 8px 6px 2px;
  background: rgba(0,0,0,0.08);
}

.helix-shell-nav-item-logout {
  color: #b13a2f;
  background: #fff;
  border-color: rgba(177,58,47,0.10);
}

.helix-shell-nav-item-logout:hover {
  background: rgba(177,58,47,0.06);
  border-color: rgba(177,58,47,0.18);
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {
  .helix-shell-menu-btn {
    display: inline-flex;
  }

  .helix-shell-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 270px;
    min-width: 270px;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    z-index: 30;
  }

  .helix-shell-menu-open .helix-shell-sidebar {
    transform: translateX(0);
  }

  .helix-shell-mobile-overlay {
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
  }

  .helix-shell-menu-open .helix-shell-mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .helix-shell-topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .helix-shell-topbar-left {
    gap: 10px;
  }

  .helix-shell-brand {
    font-size: 16px;
    letter-spacing: 0.16em;
  }

  .helix-shell-user {
    gap: 10px;
  }

  .helix-shell-user-name {
    font-size: 14px;
  }

  .helix-shell-user-company {
    font-size: 11px;
    white-space: normal;
  }

  .helix-shell-logout-btn {
    height: 38px;
    padding: 0 14px;
  }

  .helix-shell-workspace {
    padding: 20px 16px 28px;
  }

  .helix-workspace-title {
    font-size: 28px;
  }

  .helix-workspace-card {
    padding: 18px;
    border-radius: 16px;
    min-height: 0;
  }

  .helix-workspace-card-title {
    font-size: 17px;
  }

  .helix-workspace-card-text {
    font-size: 15px;
  }

  .helix-submodule-grid {
    grid-template-columns: 1fr;
  }

  .helix-submodule-tile {
    min-height: 110px;
  }
}