/**
 * Vertex Prototype App Shell Styles
 * 
 * This stylesheet provides the application shell layout including:
 * - Icon sidebar
 * - Expandable submenu panel
 * - Header bar
 * - Main content area
 */

/* ============================================== */
/* CSS Variables                                  */
/* ============================================== */

:root {
  /* Colors - Vertex Brand */
  --vx-green-50: #ecfdf5;
  --vx-green-100: #d1fae5;
  --vx-green-200: #a7f3d0;
  --vx-green-500: #10b981;
  --vx-green-600: #059669;
  --vx-green-700: #047857;
  --vx-green-800: #065f46;
  
  /* Neutrals */
  --vx-gray-50: #f9fafb;
  --vx-gray-100: #f3f4f6;
  --vx-gray-200: #e5e7eb;
  --vx-gray-300: #d1d5db;
  --vx-gray-400: #9ca3af;
  --vx-gray-500: #6b7280;
  --vx-gray-600: #4b5563;
  --vx-gray-700: #374151;
  --vx-gray-800: #1f2937;
  --vx-gray-900: #111827;
  
  /* Layout */
  --sidebar-width: 72px;
  --submenu-width: 280px;
  --header-height: 56px;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
}

/* ============================================== */
/* Base Reset                                     */
/* ============================================== */

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

html, body {
  height: 100%;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  color: var(--vx-gray-900);
  background: var(--vx-gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================== */
/* App Shell Layout                               */
/* ============================================== */

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============================================== */
/* Icon Sidebar                                   */
/* ============================================== */

.icon-sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--vx-gray-200);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-bottom {
  display: flex;
  justify-content: center;
  padding-bottom: 8px;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--vx-gray-600);
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-item i {
  font-size: 20px;
}

.sidebar-item:hover {
  background: var(--vx-gray-100);
  color: var(--vx-gray-900);
}

.sidebar-item.active {
  background: var(--vx-green-50);
  color: var(--vx-green-700);
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 32px;
  background: var(--vx-green-600);
  border-radius: 0 4px 4px 0;
}

.sidebar-label {
  font-size: 10px;
  line-height: 1;
}

.sidebar-logo {
  opacity: 0.7;
}

.menu-toggle {
  margin-bottom: 8px;
}

/* ============================================== */
/* Submenu Panel                                  */
/* ============================================== */

.submenu-panel {
  width: var(--submenu-width);
  background: white;
  border-right: 1px solid var(--vx-gray-200);
  overflow-y: auto;
  flex-shrink: 0;
  transition: width var(--transition-normal);
}

.submenu-panel.collapsed {
  width: 0;
  border-right: none;
  overflow: hidden;
}

.submenu-content {
  padding: 24px;
}

.submenu-content.hidden {
  display: none;
}

.submenu-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--vx-gray-900);
  margin-bottom: 24px;
  line-height: 1.3;
}

.submenu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.submenu-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--vx-gray-900);
  margin-top: 16px;
  margin-bottom: 8px;
}

.submenu-group-title:first-child {
  margin-top: 0;
}

.submenu-item {
  display: block;
  padding: 10px 12px;
  color: var(--vx-gray-600);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition-fast);
}

.submenu-item:hover {
  background: var(--vx-gray-100);
  color: var(--vx-gray-900);
}

.submenu-item.active {
  background: var(--vx-green-50);
  color: var(--vx-green-700);
  font-weight: 500;
}

/* ============================================== */
/* Main Wrapper                                   */
/* ============================================== */

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ============================================== */
/* Header                                         */
/* ============================================== */

.app-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--vx-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-app-icon {
  font-size: 20px;
  color: var(--vx-gray-600);
}

.header-app-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--vx-gray-900);
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--vx-gray-600);
  font-size: 18px;
  transition: all var(--transition-fast);
}

.header-icon-btn:hover {
  background: var(--vx-gray-100);
  color: var(--vx-gray-900);
}

.header-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--vx-green-600);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.header-link:hover {
  background: var(--vx-green-50);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  margin-left: 8px;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================== */
/* Content Area                                   */
/* ============================================== */

.content-area {
  flex: 1;
  overflow-y: auto;
  background: var(--vx-gray-50);
}

/* ============================================== */
/* Prototype Banner                               */
/* ============================================== */

.prototype-banner {
  background: rgba(34, 197, 94, 1);
  color: white;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

/* ============================================== */
/* Placeholder Content (Remove in actual prototype) */
/* ============================================== */

.prototype-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 43px);
  padding: 40px;
}

.placeholder-content {
  text-align: center;
  max-width: 600px;
}

.placeholder-icon {
  font-size: 64px;
  color: var(--vx-gray-300);
  margin-bottom: 24px;
}

.placeholder-content h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--vx-gray-900);
  margin-bottom: 8px;
}

.placeholder-content > p {
  font-size: 16px;
  color: var(--vx-gray-500);
  margin-bottom: 32px;
}

.placeholder-instructions {
  background: white;
  border: 1px solid var(--vx-gray-200);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
}

.placeholder-instructions h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--vx-gray-900);
  margin-bottom: 16px;
}

.placeholder-instructions ol {
  margin-left: 20px;
  color: var(--vx-gray-600);
}

.placeholder-instructions li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.placeholder-instructions code {
  background: var(--vx-gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

/* ============================================== */
/* Utility Classes                                */
/* ============================================== */

.hidden {
  display: none !important;
}

/* ============================================== */
/* Responsive Adjustments                         */
/* ============================================== */

@media (max-width: 1024px) {
  .submenu-panel {
    position: absolute;
    left: var(--sidebar-width);
    top: 0;
    bottom: 0;
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  
  .submenu-panel.collapsed {
    left: calc(var(--sidebar-width) - var(--submenu-width));
  }
}
