/* ==========================================================================
   WHALE OS — Compatibility Bridge
   Maps legacy variable names → new Design System tokens.
   Ensures all JS-generated inline CSS continues working without code changes.
   Design System tokens are loaded from design-system/*.css (imported in index.html).
   ========================================================================== */
:root {
  /* Layout dimensions */
  --max-width:           var(--container-max);
  --header-height:       72px;
  --bottom-bar-height:   64px;

  /* Legacy → DS Token Aliases */
  --primary-bg:          var(--bg-primary);
  --card-bg:             var(--surface);
  --card-hover-bg:       var(--surface-hover);
  --border-color:        var(--border);
  --border-glow:         var(--glow-sm);
  --royal-blue:          var(--accent);
  --electric:            var(--accent);
  --cyan:                var(--cyan-500);
  --amber:               var(--warning);
  --white:               var(--text-primary);
  --gray:                var(--text-secondary);
  --dark-gray:           var(--text-muted);
  --font-english:        var(--font-heading);
}



/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.container-width {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   GLOBAL SEARCH OVERLAY
   ========================================================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 4, 16, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-overlay.open {
  display: flex;
}

.search-container {
  width: 100%;
  max-width: 650px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--accent-soft);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.search-icon {
  font-size: 20px;
  margin-left: 14px;
}

#global-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 16px;
}

.search-shortcut {
  background: var(--border);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  border: 1px solid transparent;
}

.search-item:hover, .search-item.selected {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.2);
}

.si-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  font-size: 18px;
  font-family: var(--font-heading);
}

.si-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.si-details {
  flex: 1;
}

.si-name {
  font-weight: 600;
  font-size: 14px;
}

.si-cat {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.si-badge {
  font-size: 10px;
  background: rgba(0, 163, 255, 0.15);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
}

.search-footer {
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   FIXED TOP HEADER
   ========================================================================== */
.header-desktop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(2, 4, 16, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.logo-icon {
  font-size: 32px;
  margin-left: 12px;
  text-shadow: 0 0 15px rgba(0, 93, 255, 0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-btn.active {
  color: var(--text-primary);
  background: var(--accent-soft);
  box-shadow: inset 0 0 10px var(--glow-sm);
  border: 1px solid rgba(0, 93, 255, 0.2);
}

.nav-btn.locked {
  opacity: 0.5;
}

.lock-icon {
  font-size: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-search-trigger {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-search-trigger:hover {
  background: var(--border);
  border-color: rgba(0, 93, 255, 0.3);
}

.action-search-trigger kbd {
  font-family: var(--font-heading);
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
}

.action-fav {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.action-fav:hover {
  background: var(--border);
  border-color: var(--warning);
}

.fav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--warning);
  color: var(--bg-primary);
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent));
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 93, 255, 0.3);
}

/* ==========================================================================
   MAIN VIEWPORT
   ========================================================================== */
.main-viewport {
  margin-top: var(--header-height);
  padding-bottom: 80px; /* space for mobile tab bar */
  min-height: calc(100vh - var(--header-height));
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HOMEPAGE VIEW (V3 DESIGN)
   ========================================================================== */
.hero-block {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
}

.orb-1 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  top: -50px;
  right: 15%;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--cyan-500);
  bottom: -50px;
  left: 20%;
}

.hero-text {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 163, 255, 0.08);
  border: 1px solid rgba(0, 163, 255, 0.15);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
  font-family: var(--font-heading);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-500);
  box-shadow: 0 0 8px var(--cyan-500);
}

.hero-title {
  font-size: 48px;
  line-height: 1.15;
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.gradient-blue {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 20px;
  max-width: 500px;
  margin: 0 auto;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hero-search-bar:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 93, 255, 0.05);
}

.hs-icon {
  font-size: 18px;
  margin-left: 12px;
}

.hs-placeholder {
  flex: 1;
  text-align: right;
  color: var(--text-secondary);
  font-size: 14px;
}

.hs-kbd {
  font-family: var(--font-heading);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-secondary);
}

.sub-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Gateways grid */
.gateways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.gateway-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 250px;
}

.g-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, var(--glow-sm) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gateway-card:hover .g-glow {
  opacity: 1;
}

.gateway-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 93, 255, 0.05);
}

.gateway-card.disabled {
  opacity: 0.6;
}

.gateway-card.disabled:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.g-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.g-content {
  flex: 1;
}

.g-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.g-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.g-tags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.g-tags span {
  font-size: 9px;
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-heading);
  color: var(--text-secondary);
}

.g-footer {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 12px;
}

/* Featured paths grid */
.featured-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.path-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-right: 4px solid var(--path-color, var(--accent));
}

.path-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.3);
  border-right-color: var(--path-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.path-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.path-title {
  font-size: 14px;
  font-weight: 700;
}

.path-meta {
  font-size: 10px;
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-secondary);
}

.path-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.path-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,0.15);
  padding: 12px;
  border-radius: 10px;
}

.path-step-item {
  display: flex;
  align-items: center;
  font-size: 11px;
  gap: 8px;
}

.psi-bullet {
  font-size: 8px;
  color: var(--path-color);
}

/* Two columns lists */
.home-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.list-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-item-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.2);
  transform: translateX(-4px);
}

.lic-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lic-icon {
  font-size: 20px;
}

.lic-name {
  font-size: 13px;
  font-weight: 700;
}

.lic-meta {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.lic-arrow {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   TOOLKIT VIEW (V3 CATEGORIES GRID & CARD LAYOUT)
   ========================================================================== */
.toolkit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-top: 40px;
}

.view-title {
  font-size: 24px;
  font-weight: 700;
}

.view-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.btn-back-cats {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-cats:hover {
  background: var(--border);
  border-color: var(--accent);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  gap: 16px;
}

.category-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 93, 255, 0.05);
}

.cc-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(0, 93, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.cc-content {
  flex: 1;
}

.cc-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cc-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.cc-count {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
}

/* Active category bar */
.active-category-bar {
  display: flex;
  align-items: center;
  background: rgba(0, 93, 255, 0.05);
  border: 1px solid var(--glow-sm);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 30px;
  gap: 16px;
}

.ac-icon {
  font-size: 28px;
}

.ac-title {
  font-size: 15px;
  font-weight: 700;
}

.ac-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-compare-toggle {
  margin-right: auto;
  background: var(--accent);
  border: none;
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-compare-toggle:hover {
  background: #004ecc;
  box-shadow: 0 0 15px rgba(0, 93, 255, 0.4);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 250px;
  transition: all 0.25s ease;
}

.tool-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 93, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.tc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tc-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid var(--border);
  font-family: var(--font-heading);
}

.tc-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tc-name-wrap {
  flex: 1;
}

.tc-name {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.tc-rating {
  font-size: 11px;
  color: var(--warning);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
}

.tc-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tc-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
}

.tc-tag-price {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.tc-tag-price.free {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}

.tc-tag-difficulty {
  background: rgba(0, 163, 255, 0.1);
  color: var(--accent);
}

.tc-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.tc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.btn-tc-details {
  background: var(--accent-soft);
  border: 1px solid rgba(0, 93, 255, 0.2);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font-arabic);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tc-details:hover {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 93, 255, 0.3);
}

.btn-tc-fav {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.btn-tc-fav:hover {
  transform: scale(1.2);
}

.btn-tc-fav.active {
  color: var(--warning);
}

.btn-tc-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.btn-tc-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   COMPARE TOOLS TABLE STYLE
   ========================================================================== */
.compare-table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  margin-bottom: 24px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 12px;
}

.compare-table th, .compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: rgba(0,0,0,0.3);
  font-weight: 700;
  color: var(--text-primary);
}

.compare-table td.ct-tool-name {
  font-weight: 700;
  font-family: var(--font-heading);
}

.compare-table tr:hover td {
  background: rgba(255,255,255,0.01);
}

/* ==========================================================================
   LEVEL 3: DETAILS DRAWER OVERLAY & TABS
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 4, 16, 0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.details-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: rgba(2, 4, 16, 0.85);
  backdrop-filter: blur(25px);
  border-left: 1px solid var(--border);
  z-index: 600;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.details-drawer.open {
  transform: translateX(0);
  box-shadow: -20px 0 50px rgba(0,0,0,0.6), 0 0 30px rgba(0, 93, 255, 0.05);
}

.drawer-close-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.drawer-close-btn:hover {
  background: var(--border-strong);
  border-color: rgba(255,255,255,0.3);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  padding-top: 60px; /* space for close button */
}

/* Quick Metrics styling */
.d-quick-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.metric-value {
  font-size: 12px;
  font-weight: 600;
}

.metric-value.rating {
  color: var(--warning);
  font-family: var(--font-heading);
}

/* Drawer Tabs selector */
.d-tabs-row {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.d-tabs-row::-webkit-scrollbar {
  display: none;
}

.d-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.d-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.02);
}

.d-tab-btn.active {
  color: var(--text-primary);
  background: var(--accent);
}

/* Drawer layout tags */
.d-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.d-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.d-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.d-name {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.d-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.d-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.btn-d-link {
  background: var(--accent);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.btn-d-link:hover {
  background: #004ecc;
}

.btn-d-fav {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-d-fav:hover {
  background: var(--border);
  border-color: var(--warning);
}

.btn-d-fav.active {
  color: var(--warning);
  border-color: var(--warning);
}

/* Tab content panel */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

.d-content-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
}

.d-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.d-list {
  margin-bottom: 20px;
  padding-right: 18px;
}

.d-list li {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Pros and Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.pc-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.pc-box.pros {
  border-right: 3px solid var(--success);
}

.pc-box.cons {
  border-right: 3px solid var(--danger);
}

.pc-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 8px;
}

.pc-title.pros { color: var(--success); }
.pc-title.cons { color: var(--danger); }

/* Workflow Steps */
.d-workflow-step {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  position: relative;
}

.dw-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dw-text {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Video card placeholder */
.d-video-card {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 20px;
}

.d-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 93, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.3s ease;
}

.d-video-card:hover .d-video-overlay {
  background: rgba(0, 93, 255, 0.4);
}

.play-icon {
  font-size: 32px;
  color: var(--text-primary);
  text-shadow: 0 0 15px rgba(0, 93, 255, 0.6);
}

/* Expanded Knowledge Graph styling */
.d-graph-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 30px;
}

.graph-group {
  margin-bottom: 14px;
}

.graph-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.graph-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.graph-chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.graph-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text-primary);
}

.graph-chip.tag-tool { border-right: 2px solid var(--accent); }
.graph-chip.tag-prompt { border-right: 2px solid #a300ff; }
.graph-chip.tag-usecase { border-right: 2px solid var(--success); }
.graph-chip.tag-formula { border-right: 2px solid var(--warning); }

/* Settings elements */
.settings-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.settings-card h3 {
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--accent);
}

.settings-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.shortcut-row kbd {
  font-family: var(--font-heading);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-clear-storage {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.2);
  color: var(--danger);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 14px;
  transition: all 0.2s ease;
}

.btn-clear-storage:hover {
  background: var(--danger);
  color: var(--text-primary);
}

.btn-run-qa {
  background: rgba(0, 163, 255, 0.08);
  border: 1px solid rgba(0, 163, 255, 0.25);
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 14px;
  transition: all 0.2s ease;
}

.btn-run-qa:hover {
  background: rgba(0, 163, 255, 0.18);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Toasts */
.locked-toast {
  position: fixed;
  bottom: 80px;
  right: 50%;
  transform: translateX(50%) translateY(100px);
  background: rgba(2, 4, 16, 0.9);
  border: 1px solid rgba(0, 93, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 13px;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
}

.locked-toast.show {
  transform: translateX(50%) translateY(0);
}

/* Bottom mobile bar */
.mobile-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--bottom-bar-height);
  background: rgba(2, 4, 16, 0.85);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 90;
  display: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
.mobile-only-btn {
  display: none !important;
}

.em-table-wrapper {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .details-drawer {
    width: 420px;
  }
}

@media (max-width: 768px) {
  /* Toggle layouts for mobile-first experience */
  .header-desktop {
    display: block !important;
    height: 60px !important;
  }
  .header-container {
    padding: 0 16px !important;
  }
  .header-search-entry {
    display: none !important;
  }
  .logo-text {
    display: none !important;
  }
  .logo-icon {
    font-size: 28px !important;
    margin-left: 0 !important;
  }
  .mobile-only-btn {
    display: inline-flex !important;
  }
  
  .mobile-tab-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  
  .tab-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1;
    padding: 8px 0;
  }
  
  .tab-item.active {
    color: var(--accent);
  }
  
  .tab-icon {
    font-size: 20px;
  }
  
  .tab-label {
    font-size: 10px;
    font-weight: 600;
  }

  .main-viewport {
    margin-top: 60px !important;
    padding-top: 15px !important;
  }
  
  .hero-block {
    padding: 30px 0;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .home-two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Sliding Bottom Sheet for Mobile details */
  .details-drawer {
    width: 100%;
    height: 85%;
    top: auto;
    bottom: 0;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
  }
  
  .details-drawer.open {
    transform: translateY(0);
  }
  
  .drawer-close-btn {
    top: 12px;
    left: auto;
    right: 20px;
  }

  .toolkit-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .btn-compare-toggle {
    width: 100%;
    margin-top: 10px;
  }

  .active-category-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   V3 INLINE DOUBLE PANEL & PRODUCT PROFILE SYSTEM
   ========================================================================== */

/* Page Headers */
.toolkit-main-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
}
.breadcrumb-trail {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-family: var(--font-heading);
}
.breadcrumb-trail .active-step {
  color: var(--accent);
  font-weight: 600;
}
.view-title-centered {
  font-size: 36px;
  font-weight: 900;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.view-desc-centered {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Double Panel Layout Container */
.toolkit-double-panel {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 60px;
}

/* Left Sidebar Panel */
.categories-sidebar-panel {
  position: relative;
}
.sidebar-sticky-card {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(15px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.sidebar-categories-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  color: var(--text-secondary);
}
.sidebar-cat-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.sidebar-cat-item.active {
  background: var(--accent-soft);
  border-color: var(--glow-md);
  color: var(--cyan-500);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 93, 255, 0.05);
}
.sidebar-cat-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-cat-icon {
  font-size: 18px;
}
.sidebar-cat-title {
  font-size: 13px;
}
.sidebar-cat-count {
  font-size: 10px;
  background: var(--surface-hover);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
}
.sidebar-cat-item.active .sidebar-cat-count {
  background: var(--accent);
  color: var(--text-primary);
}

/* Right Content Panel */
.toolkit-main-content-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Active Category header */
.active-category-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 93, 255, 0.04);
  border: 1px solid var(--accent-soft);
  border-radius: 18px;
  padding: 16px 24px;
  margin-bottom: 24px;
  gap: 16px;
}
.ach-text {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ach-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ach-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.ach-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Tools Grid Layout (inside main column) */
.tools-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Tool card stylings */
.tool-grid-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  height: 200px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.tool-grid-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.tool-grid-card.active {
  border-color: var(--accent);
  background: rgba(0, 93, 255, 0.03);
  box-shadow: 0 0 20px rgba(0, 93, 255, 0.2);
}
/* Premium gradient glow outline for active card */
.tool-grid-card.active::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent), var(--cyan-500));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.tgc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.tgc-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tgc-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.tgc-title-wrap {
  flex: 1;
  min-width: 0;
}
.tgc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tgc-role {
  font-size: 10px;
  color: var(--accent);
  margin-top: 1px;
}
.tgc-rating {
  font-size: 10px;
  color: var(--warning);
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.tgc-body {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.tgc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  font-size: 10px;
  color: var(--text-secondary);
}
.tgc-fav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: transform 0.2s ease;
  line-height: 1;
}
.tgc-fav-btn:hover {
  transform: scale(1.25);
  color: var(--warning);
}
.tgc-fav-btn.active {
  color: var(--warning);
}

/* Product Profile Wrapper */
.product-profile-wrapper {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 35px;
  margin-top: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 93, 255, 0.05);
  backdrop-filter: blur(20px);
  animation: slideUpProfile 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpProfile {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes highlightPulse {
  0% {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0px rgba(0, 93, 255, 0);
    border-color: var(--border);
  }
  30% {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 93, 255, 0.45);
    border-color: var(--accent);
  }
  100% {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 93, 255, 0.05);
    border-color: var(--border);
  }
}
.product-profile-wrapper.highlight-pulse {
  animation: slideUpProfile 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             highlightPulse 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Profile Header Card */
.profile-header-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.phc-info-wrap {
  flex: 1;
}
.phc-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.phc-title {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-primary);
}
.phc-rating {
  background: rgba(255, 196, 0, 0.1);
  border: 1px solid rgba(255, 196, 0, 0.25);
  color: var(--warning);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 4px;
}
.phc-summary {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 750px;
}
.phc-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.phc-tag {
  background: rgba(0, 163, 255, 0.06);
  border: 1px solid rgba(0, 163, 255, 0.15);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.phc-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.phc-logo-card {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--text-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.phc-logo-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

/* Action Buttons inside Profile */
.btn-profile-primary {
  background: var(--accent);
  color: var(--text-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  font-family: var(--font-arabic);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-profile-primary:hover {
  background: #004ecc;
  box-shadow: 0 4px 15px rgba(0, 93, 255, 0.35);
}
.btn-profile-secondary {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  font-family: var(--font-arabic);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-profile-secondary:hover {
  background: var(--border);
  border-color: var(--border-strong);
}
.btn-profile-secondary.active {
  color: var(--warning);
  border-color: var(--warning);
  background: rgba(255, 196, 0, 0.05);
}

/* Sticky horizontal tabs nav bar inside profile page */
.profile-tabs-nav-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  margin-bottom: 30px;
  margin-top: 15px;
  overflow-x: auto;
  position: sticky;
  top: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(15px);
  z-index: 80;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.profile-tabs-nav-bar::-webkit-scrollbar {
  display: none;
}
.profile-nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.profile-nav-tab:hover {
  color: var(--text-primary);
}
.profile-nav-tab.active {
  color: var(--cyan-500);
  font-weight: 700;
}
.profile-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan-500);
  box-shadow: 0 0 10px var(--cyan-500);
}

/* Split Columns inside Profile */
.profile-grid-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
}

/* Left Content Column */
.profile-sections-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}

/* Section styling */
.profile-detail-section {
  scroll-margin-top: 140px; /* offset for sticky navigation tabs + header */
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}
.pds-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--cyan-500);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 10px;
}
.pds-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Quick facts grid layout */
.facts-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.fact-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.fact-label {
  font-size: 10.5px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}
.fact-value {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.fact-value.rating-glow {
  color: var(--warning);
  font-family: var(--font-heading);
  text-shadow: 0 0 8px rgba(255, 196, 0, 0.2);
}

/* Workflow Steps Timeline */
.profile-workflow-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pf-step-row {
  display: flex;
  gap: 16px;
}
.pf-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 93, 255, 0.2);
}
.pf-step-content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 1px;
}

/* Pros and Cons */
.profile-pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.pc-card-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.pc-card-box.pros-box {
  border-right: 4px solid var(--success);
}
.pc-card-box.cons-box {
  border-right: 4px solid var(--danger);
}
.pc-box-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.pc-box-title.pros-color {
  color: var(--success);
}
.pc-box-title.cons-color {
  color: var(--danger);
}
.pc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-list-item {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  padding-right: 14px;
}
.pc-list-item::before {
  content: '•';
  position: absolute;
  right: 0;
  font-size: 14px;
}
.pc-card-box.pros-box .pc-list-item::before {
  color: var(--success);
}
.pc-card-box.cons-box .pc-list-item::before {
  color: var(--danger);
}

/* WHALE Recommendation Block */
.whale-rec-block {
  border-right: 4px solid var(--accent);
  background: linear-gradient(90deg, rgba(0, 93, 255, 0.06), transparent);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}
.whale-rec-text {
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.65;
}

/* HTML/CSS Interactive Mock Browser representation */
.mock-app-screenshot {
  background: #090c10;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-top: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  direction: ltr; /* Mocking tools layout usually LTR */
}
.mock-browser-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 12px;
}
.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mock-dot.red { background: #ff5f56; }
.mock-dot.yellow { background: #ffbd2e; }
.mock-dot.green { background: #27c93f; }
.mock-browser-address {
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  font-size: 9px;
  color: var(--text-secondary);
  padding: 3px 12px;
  flex: 1;
  text-align: left;
  font-family: var(--font-heading);
}
.mock-app-workspace {
  display: grid;
  grid-template-columns: 90px 1fr;
  height: 150px;
  gap: 12px;
}
.mock-app-sidebar {
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mock-sidebar-line {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
}
.mock-sidebar-line.short { width: 60%; }
.mock-sidebar-line.active { background: var(--accent); }
.mock-app-canvas {
  background: rgba(255,255,255,0.01);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mock-canvas-title {
  height: 12px;
  background: rgba(255,255,255,0.08);
  width: 45%;
  border-radius: 3px;
}
.mock-canvas-block {
  flex: 1;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

/* Right TOC column */
.profile-toc-column {
  position: sticky;
  top: calc(var(--header-height) + 80px);
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.toc-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
}
.toc-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.toc-sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toc-sidebar-item {
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-sidebar-item:hover {
  color: var(--text-primary);
}
.toc-sidebar-item.active {
  color: var(--cyan-500);
  font-weight: 700;
}
.toc-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s ease;
}
.toc-sidebar-item.active .toc-bullet {
  background: var(--cyan-500);
  box-shadow: 0 0 8px var(--cyan-500);
  transform: scale(1.3);
}

/* ==========================================================================
   V3 STYLING RESPONSIVENESS (MOBILE FIRST REFINEMENTS)
   ========================================================================== */
@media (max-width: 1024px) {
  .toolkit-double-panel {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }
  .profile-grid-columns {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Reset body and html width to 100% and prevent horizontal scrolling */
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Container padding reduction for mobile */
  .container-width {
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Prevent grid/flex item children overflow and force stack layout */
  .toolkit-double-panel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .toolkit-main-content-panel,
  .categories-sidebar-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
  }
  
  /* Sidebar turns into horizontal swiper on mobile */
  .sidebar-sticky-card {
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    width: 100% !important;
    max-width: 100% !important;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-categories-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 4px 0 12px 0 !important;
    gap: 8px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .sidebar-categories-list::-webkit-scrollbar {
    display: none !important;
  }
  .sidebar-cat-item {
    padding: 8px 14px !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .sidebar-cat-item.active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--text-primary) !important;
  }
  .sidebar-cat-count {
    display: none !important; /* Hide counts on mobile sidebar to save horizontal space */
  }

  /* Active header tweaks on mobile */
  .active-category-header-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px 16px !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .btn-compare-toggle {
    width: 100% !important;
    margin: 10px 0 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    font-size: 12px !important;
    background: var(--accent) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    border: none !important;
    height: auto !important;
  }

  /* Force Tools Grid Layout to 1 column on mobile to prevent overflow */
  .tools-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .tool-grid-card {
    height: auto !important;
    min-height: 140px !important;
    padding: 14px 16px !important;
  }

  /* Profile layout stack */
  .profile-grid-columns {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Hide Table of Contents sidebar on mobile devices */
  .profile-toc-column {
    display: none !important;
  }

  .product-profile-wrapper {
    padding: 20px !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .profile-header-card {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  .phc-logo-card {
    width: 72px !important;
    height: 72px !important;
    border-radius: 16px !important;
  }
  .phc-logo-img {
    width: 50px !important;
    height: 50px !important;
  }
  .phc-title {
    font-size: 22px !important;
  }

  /* Sticky tabs top offset tweak for mobile */
  .profile-tabs-nav-bar {
    top: 0 !important;
    margin-top: 10px !important;
    padding-bottom: 2px !important;
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  
  .profile-pros-cons-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ==========================================================================
   MOBILE UX OPTIMIZATION PASS (SCREENS UNDER 768px)
   ========================================================================== */

/* Smooth Fade-In Transition when switching between tools */
.profile-fade-in {
  animation: profileFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes profileFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile TOC Accordion styling */
.mobile-toc-accordion-wrap {
  display: none;
}

@media (max-width: 768px) {
  /* Collapsible Mobile TOC Accordion card */
  .mobile-toc-accordion-wrap {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  }
  .mobile-toc-trigger {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--cyan-500);
    padding: 12px 16px;
    font-family: var(--font-arabic);
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: right;
  }
  .mobile-toc-trigger:hover, .mobile-toc-trigger:active {
    background: var(--surface);
  }
  .mobile-toc-dropdown {
    border-top: 1px solid var(--border);
    background: rgba(2, 4, 16, 0.75);
    max-height: 380px;
    overflow-y: auto;
  }
  .mobile-toc-list {
    list-style: none;
    padding: 6px 0;
    margin: 0;
  }
  .mobile-toc-item {
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .mobile-toc-item:hover, .mobile-toc-item:active {
    background: var(--accent-soft);
    color: var(--text-primary);
  }

  /* 1. Reduce Tool Header Height by 30-40% */
  .profile-header-card {
    padding: 16px !important;
    margin-bottom: 16px !important;
    gap: 16px !important;
  }
  .phc-logo-card {
    width: 54px !important;
    height: 54px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
  }
  .phc-logo-img {
    width: 36px !important;
    height: 36px !important;
  }
  .phc-title {
    font-size: 18px !important;
  }
  .phc-rating {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }
  .phc-summary {
    font-size: 11px !important;
    margin-top: 6px !important;
    line-height: 1.55 !important;
  }
  .phc-tags {
    margin-top: 8px !important;
    gap: 4px !important;
  }
  .phc-tag {
    font-size: 9.5px !important;
    padding: 2px 8px !important;
  }

  /* 2. Compact Action Buttons in a Single Horizontal Row */
  .phc-actions-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin-top: 14px !important;
    width: 100% !important;
  }
  .btn-profile-primary, .btn-profile-secondary {
    font-size: 9.5px !important;
    padding: 8px 4px !important;
    border-radius: 8px !important;
    flex: 1 !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    margin: 0 !important;
    min-width: 0 !important;
  }

  /* 3. Convert Section Tabs into Horizontally Scrollable Pills Bar */
  .profile-tabs-nav-bar {
    border-bottom: none !important;
    padding: 8px 0 !important;
    background: transparent !important;
    margin-bottom: 20px !important;
    margin-top: 5px !important;
  }
  .profile-nav-tab {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    margin: 0 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
  }
  .profile-nav-tab:hover, .profile-nav-tab:active {
    background: var(--border) !important;
  }
  .profile-nav-tab.active {
    background: var(--cyan-500) !important;
    color: var(--bg-primary) !important;
    border-color: var(--cyan-500) !important;
    font-weight: 700 !important;
  }
  .profile-nav-tab.active::after {
    display: none !important; /* Hide indicator line */
  }

  /* 5. Reduce Preview Image/Browser Heights to 180-220px */
  .mock-app-screenshot {
    max-height: 180px !important;
    margin-top: 14px !important;
    padding: 8px !important;
  }
  .mock-app-workspace {
    height: 100px !important;
    gap: 8px !important;
  }
  .mock-app-sidebar {
    width: 60px !important;
    padding: 4px !important;
    gap: 4px !important;
  }
  .mock-sidebar-line {
    height: 4px !important;
  }
  .mock-app-canvas {
    padding: 8px !important;
    gap: 8px !important;
  }
  .mock-canvas-title {
    height: 8px !important;
  }
  .mock-canvas-block {
    font-size: 8px !important;
  }

  /* 7. Improve Spacing and Vertical Rhythm */
  .product-profile-wrapper {
    padding: 16px !important;
    border-radius: 16px !important;
    margin-top: 16px !important;
  }
  .profile-sections-column {
    gap: 20px !important;
  }
  .profile-detail-section {
    padding: 16px !important;
    border-radius: 12px !important;
    scroll-margin-top: 150px !important; /* Tight offset for mobile tabs */
  }
  .pds-title {
    font-size: 13px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .pds-text {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
  }
  .facts-grid-layout {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .fact-item-card {
    padding: 10px !important;
    border-radius: 8px !important;
  }
  .fact-label {
    font-size: 9px !important;
  }
  .fact-value {
    font-size: 11px !important;
  }
  .profile-workflow-timeline {
    gap: 12px !important;
  }
  .pf-step-row {
    gap: 10px !important;
  }
  .pf-step-badge {
    width: 20px !important;
    height: 20px !important;
    font-size: 9px !important;
  }
  .pf-step-content {
    font-size: 11px !important;
  }
  .pc-card-box {
    padding: 14px !important;
    border-radius: 12px !important;
  }
  .pc-box-title {
    font-size: 11.5px !important;
  }
  .pc-list-item {
    font-size: 11px !important;
  }
  .whale-rec-block {
    padding: 12px 14px !important;
  }
  .whale-rec-text {
    font-size: 11.5px !important;
  }
  .graph-chips {
    gap: 4px !important;
  }
  .graph-chip {
    font-size: 9px !important;
    padding: 3px 8px !important;
  }
}

/* FLOATING BACK TO GRID BUTTON styling */
.floating-back-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--accent);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: 30px;
  font-family: var(--font-arabic);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 93, 255, 0.45);
  z-index: 999;
  display: none; /* controlled by scrollspy */
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.floating-back-btn:hover {
  background: #004ecc;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 93, 255, 0.65);
}

@media (max-width: 768px) {
  .floating-back-btn {
    bottom: 80px; /* above mobile tab bar */
    left: 20px;
    font-size: 11px;
    padding: 8px 14px;
    box-shadow: 0 6px 20px rgba(0, 93, 255, 0.5);
  }
}

/* ==========================================================================
   EXCEL PLAYBOOK CUSTOM CALCULATOR INTERACTIVE COMPONENT STYLES
   ========================================================================== */
.calc-difficulty-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-block;
}
.calc-difficulty-badge.easy {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.25);
  color: var(--success);
}
.calc-difficulty-badge.medium {
  background: var(--accent-soft);
  border: 1px solid var(--glow-md);
  color: var(--cyan-500);
}
.calc-difficulty-badge.hard {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.25);
  color: var(--danger);
}

.calc-simulator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.calc-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.calc-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calc-field {
  width: 100%;
  padding: 12px;
  background: rgba(2, 4, 16, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}
.calc-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 93, 255, 0.35);
}

.calc-btn-submit {
  background: var(--accent);
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-arabic);
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.calc-btn-submit:hover {
  background: #004ecc;
  box-shadow: 0 4px 15px rgba(0, 93, 255, 0.35);
}

/* Simulator Output Display board */
.calc-output-card {
  background: rgba(0, 93, 255, 0.02);
  border: 1px solid var(--glow-sm);
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.calc-output-card.active-glow {
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.12);
  border-color: var(--cyan-500);
}

.calc-output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.calc-output-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-output-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.calc-output-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.calc-output-value.highlight-value {
  color: var(--cyan-500);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.calc-benchmark-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 14px;
}
.calc-benchmark-badge.excellent {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.25);
  color: var(--success);
}
.calc-benchmark-badge.normal {
  background: rgba(0, 163, 255, 0.1);
  border: 1px solid rgba(0, 163, 255, 0.25);
  color: var(--accent);
}
.calc-benchmark-badge.attention {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.25);
  color: var(--danger);
}

.tag-excel-function {
  background: var(--accent-soft);
  border: 1px solid rgba(0, 93, 255, 0.2);
  color: var(--cyan-500);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
  margin: 4px;
}

/* ==========================================================================
   GLASSMORPHIC CUSTOM DROP-DOWN SELECT STYLES
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  text-align: right;
  direction: rtl;
}

.custom-select-trigger {
  width: 100%;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-trigger:hover {
  border-color: rgba(0, 229, 255, 0.4);
  background: var(--surface-hover);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--cyan-500);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
  background: rgba(0, 93, 255, 0.05);
}

.custom-select-arrow {
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--cyan-500);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(2, 11, 61, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 229, 255, 0.1);
  z-index: 1000;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  pointer-events: none;
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Scrollbar styling for options */
.custom-select-options::-webkit-scrollbar {
  width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.3);
}

.custom-select-option {
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-arabic);
  font-size: 12.5px;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select-option:hover {
  background: var(--glow-sm);
  color: var(--text-primary);
  padding-right: 20px;
}

.custom-select-option.selected {
  background: var(--glow-md);
  color: var(--cyan-500);
  font-weight: bold;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.custom-select-option.selected::after {
  content: "✓";
  font-size: 11px;
  color: var(--cyan-500);
  font-weight: bold;
}

/* Tooltip system styling */
.calc-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.calc-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--border);
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  cursor: help;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.calc-tooltip-icon:hover {
  background: var(--cyan-500);
  color: var(--dark-bg);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.calc-tooltip-text {
  visibility: hidden;
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(4, 11, 41, 0.98);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
  width: 240px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  font-family: var(--font-arabic);
  font-weight: normal;
}

.calc-tooltip-icon:hover .calc-tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Payroll Audit Report styling */
.payroll-audit-card {
  margin-top: 24px;
  padding: 20px;
  background: rgba(0, 93, 255, 0.03);
  border: 1px solid var(--glow-sm);
  border-radius: 12px;
  direction: rtl;
  text-align: right;
}

.payroll-audit-card h4 {
  font-size: 14px;
  color: var(--cyan-500);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-arabic);
}

.payroll-audit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-arabic);
}

.payroll-audit-list > li {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 10px;
}

.payroll-audit-list > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.payroll-audit-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.tax-calculation-steps,
.tax-brackets-steps {
  margin-top: 6px;
  padding: 10px;
  background: var(--surface);
  border-radius: 6px;
  border-right: 2px solid rgba(0, 229, 255, 0.3);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.highlight-net {
  font-weight: bold;
  color: var(--success);
  font-size: 13.5px;
}

.highlight-cost {
  font-weight: bold;
  color: var(--cyan-500);
  font-size: 13.5px;
}

/* ==========================================================================
   PREMIUM GLASSMORPHIC LEARNING PATH CARD STYLES
   ========================================================================== */
.learning-path-card {
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.learning-path-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--path-color, var(--accent));
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.learning-path-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 40px 0 rgba(0, 229, 255, 0.15), 0 0 20px 0 var(--surface);
}

.learning-path-card:hover::before {
  opacity: 1;
}

/* Header */
.lp-header {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.lp-emoji {
  font-size: 24px;
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: inset 0 0 10px var(--surface-hover);
}

.lp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.lp-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.lp-duration {
  font-size: 10px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--text-primary);
  margin-right: auto;
  align-self: flex-start;
  white-space: nowrap;
}

/* Progress */
.lp-progress-bar {
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.lp-progress-fill {
  background: linear-gradient(90deg, var(--path-color), var(--cyan-500));
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lp-progress-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: -8px;
}

/* Steps list */
.lp-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--surface);
}

.lp-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lp-step:hover {
  background: var(--surface);
  color: var(--text-primary);
  transform: translateX(-4px);
}

.lp-step.done {
  color: var(--success);
}

.lp-step-icon {
  font-size: 12px;
  color: var(--text-secondary);
}

.lp-step.done .lp-step-icon {
  color: var(--success);
}

.lp-step-more {
  font-size: 11px;
  color: var(--cyan-500);
  cursor: pointer;
  padding: 4px 8px;
  align-self: flex-start;
  transition: all 0.2s ease;
}

.lp-step-more:hover {
  color: var(--text-primary);
  transform: translateX(-4px);
}

/* Glass Start Button */
.lp-start-btn {
  background: var(--surface);
  border: 1px solid rgba(var(--path-color-rgb), 0.4);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font-arabic);
  font-size: 13px;
  font-weight: 600;
  color: var(--path-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 12px var(--surface);
}

.lp-start-btn:hover {
  background: rgba(var(--path-color-rgb), 0.08);
  border-color: var(--path-color);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(var(--path-color-rgb), 0.25), inset 0 0 12px var(--surface-hover);
  transform: translateY(-2px);
}

.lp-start-btn:active {
  transform: translateY(0);
}






/* ============================================================
   EXCEL FUNCTIONS HUB STYLES
   ============================================================ */

.playbook-tab-btn:hover {
  background: var(--surface) !important;
  color: var(--text-primary) !important;
}

.diff-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.diff-easy {
  background: rgba(46, 204, 113, 0.1);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.2);
}
.diff-medium {
  background: rgba(241, 196, 15, 0.1);
  color: var(--warning);
  border: 1px solid rgba(241, 196, 15, 0.2);
}
.diff-hard {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.code-block-wrapper {
  position: relative;
  margin: 12px 0;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.code-block-wrapper pre {
  margin: 0;
  padding: 16px 120px 16px 20px;
  overflow-x: auto;
}
.code-block-wrapper code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: var(--cyan-500);
  direction: ltr;
  display: block;
}
.btn-copy-formula {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 11px;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-copy-formula:hover {
  background: rgba(0, 198, 251, 0.15);
  border-color: rgba(0, 198, 251, 0.3);
  color: var(--text-primary);
}
.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.params-table th, .params-table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.params-table th {
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 600;
}
.params-table td {
  color: var(--text-primary);
}
.param-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}
.param-status.required {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
}
.param-status.optional {
  background: rgba(149, 165, 166, 0.1);
  color: #95a5a6;
}

.hr-scenario-box {
  background: rgba(0, 198, 251, 0.02);
  border-right: 4px solid var(--cyan-500);
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

.real-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}
.real-file-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.rfc-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.rfc-info {
  flex: 1;
}
.rfc-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  margin-bottom: 4px;
}
.rfc-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.related-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.related-item-card:hover {
  background: rgba(0, 198, 251, 0.05);
  border-color: rgba(0, 198, 251, 0.2);
  transform: translateX(-4px);
}
.ric-icon {
  font-size: 16px;
}
.ric-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.whale-rec-box {
  background: rgba(0, 198, 251, 0.04);
  border: 1px solid rgba(0, 198, 251, 0.15);
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
}
.wrb-header {
  font-weight: bold;
  color: var(--cyan-500);
  margin-bottom: 8px;
  font-size: 13px;
}
.wrb-body {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
}

.mistakes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mistake-item {
  background: rgba(231, 76, 60, 0.02);
  border: 1px solid rgba(231, 76, 60, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mistake-error {
  font-family: monospace;
  font-weight: bold;
  color: var(--danger);
  font-size: 13px;
}
.mistake-cause {
  color: var(--text-primary);
  font-size: 13px;
}

.builder-formula-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.domain-block {
  margin-bottom: 24px;
}
.domain-title {
  color: var(--cyan-500);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 8px;
}


/* Responsive grid for functions profile */
.functions-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
  width: 100%;
}

@media (max-width: 1024px) {
  .functions-two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ==========================================================================
   GLOBAL OVERFLOW & TEXT WRAPPING FIXES FOR EXCEL FUNCTIONS HUB
   ========================================================================== */

#function-profile-section,
#function-profile-section * {
  box-sizing: border-box;
}

/* Force word wrap on all text elements inside Function Profile */
#function-profile-section p,
#function-profile-section span,
#function-profile-section h1,
#function-profile-section h2,
#function-profile-section h3,
#function-profile-section h4,
#function-profile-section li,
#function-profile-section td,
#function-profile-section th {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

/* Prevent code blocks from breaking/wrapping, enable horizontal scrolling instead */
#function-profile-section pre,
#function-profile-section pre *,
#function-profile-section code,
#function-profile-section code * {
  white-space: pre !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#function-profile-section .code-block-wrapper pre {
  overflow-x: auto !important;
  max-width: 100% !important;
  display: block !important;
  width: 100% !important;
}

/* Ensure all cards auto-expand in height based on content */
#function-profile-section .tab-content-panel,
#function-profile-section .product-profile-header-card,
#function-profile-section .real-file-card,
#function-profile-section .builder-formula-card,
#function-profile-section .related-item-card,
#function-profile-section .whale-rec-box,
#function-profile-section .hr-scenario-box,
#function-profile-section .mistake-item,
#function-profile-section div[style*="background"] {
  height: auto !important;
  min-height: min-content !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Spacing layout guidelines (TOC items, Titles, Paragraphs, Blocks) */
#function-profile-section h3,
#function-profile-section h4 {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.4;
}

#function-profile-section p {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.6;
}

#function-profile-section ul,
#function-profile-section ol {
  margin-top: 0;
  margin-bottom: 16px;
  padding-right: 20px;
}

#function-profile-section .code-block-wrapper {
  margin: 16px 0;
}

/* Responsive table wrapper */
#function-profile-section .params-table-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  width: 100% !important;
  margin-bottom: 20px;
}


/* ==========================================================================
   STRICT GRID / FLEX SIZING & OVERFLOW FIXES FOR FUNCTIONS HUB
   ========================================================================== */

/* 1. Prevent profile wrappers from pushing wider than their main content panel */
.product-profile-wrapper,
#function-profile-section {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* 2. Enforce min-width: 0 on all grid children inside Functions Hub to allow shrinking */
.functions-two-col > div,
.profile-meta-grid > div,
.formula-builder-domains > div,
.tools-grid-layout > div,
.facts-grid-layout > div {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 3. Enforce min-width: 0 on all flex children inside Functions Hub to allow shrinking */
.real-file-card > div,
.builder-formula-card > div,
.related-item-card > div,
.whale-rec-box > div,
.hr-scenario-box > div,
.mistake-item > div {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 4. Enforce overflow: hidden on cards to contain sizing */
#function-profile-section .product-profile-header-card,
#function-profile-section .real-file-card,
#function-profile-section .builder-formula-card,
#function-profile-section .whale-rec-box,
#function-profile-section .hr-scenario-box,
#function-profile-section .mistake-item {
  overflow: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 5. Force strict word wrapping on technical strings anywhere except code pre blocks */
#function-profile-section p,
#function-profile-section span,
#function-profile-section li,
#function-profile-section td,
#function-profile-section th,
#function-profile-section h1,
#function-profile-section h2,
#function-profile-section h3,
#function-profile-section h4 {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* 6. Formula code and pre block scroll behavior overrides */
#function-profile-section pre,
#function-profile-section pre *,
#function-profile-section code,
#function-profile-section code * {
  white-space: pre !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

#function-profile-section .code-block-wrapper pre {
  overflow-x: auto !important;
  max-width: 100% !important;
  display: block !important;
  width: 100% !important;
}

#function-profile-section .params-table-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

#function-profile-section .params-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: auto !important;
}


/* Parameters table column width optimizations */
#function-profile-section .params-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

#function-profile-section .params-table th:nth-child(1),
#function-profile-section .params-table td:nth-child(1) {
  width: 30% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: right !important;
}

#function-profile-section .params-table th:nth-child(2),
#function-profile-section .params-table td:nth-child(2) {
  width: 53% !important;
  text-align: right !important;
  white-space: normal !important;
}

#function-profile-section .params-table th:nth-child(3),
#function-profile-section .params-table td:nth-child(3) {
  width: 17% !important;
  white-space: nowrap !important;
  text-align: center !important;
}

/* Force left-alignment for formulas to prevent overlapping right-aligned copy button */
#function-profile-section .code-block-wrapper pre,
#function-profile-section .code-block-wrapper code {
  text-align: left !important;
  direction: ltr !important;
}

/* ============================================================
   AI PROMPT LIBRARY CUSTOM STYLES
   ============================================================ */

/* Prompts Stats Cards Grid */
.prompts-stats-row .stats-card {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  cursor: default;
}
.prompts-stats-row .stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 198, 251, 0.15), 0 0 15px var(--surface);
  border-color: rgba(0, 198, 251, 0.3) !important;
}

/* Guide Educational Tabs */
.guide-tab-btn {
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
.guide-tab-btn:hover {
  color: var(--text-primary) !important;
  opacity: 0.9;
}

/* Prompts Builder Inputs styling */
.prompt-builder-card input[type="text"] {
  border-color: var(--border-strong) !important;
  background: var(--surface) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.prompt-builder-card input[type="text"]:focus {
  border-color: var(--cyan-500) !important;
  background: rgba(0, 198, 251, 0.05) !important;
  box-shadow: 0 0 15px rgba(0, 198, 251, 0.2);
}

/* Prompt Preview Box styling */
.prompt-preview-box {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.prompt-preview-box:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Prompt Recent Pills hover */
.recent-pill {
  transition: all 0.2s ease;
}
.recent-pill:hover {
  background: rgba(0, 198, 251, 0.1) !important;
  border-color: rgba(0, 198, 251, 0.3) !important;
  transform: translateY(-2px);
}



/* USE CASES HUB ADDITIONS */
.usecases-quick-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.u-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 100px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.u-stat-val {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: var(--gold, #ffb300);
}
.u-stat-lbl {
  font-size: 11px;
  color: #aaa;
}

/* Quick Wins Section */
.quick-wins-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.qw-card {
  position: relative;
  background: linear-gradient(135deg, var(--surface-hover) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.05);
}
.qw-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.2);
  background: var(--border);
}
.qw-badge {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan-500);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-weight: bold;
  display: inline-block;
  margin-bottom: 8px;
}

/* Onboarding Shortcuts */
.onboarding-curated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.onboarding-card {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 179, 0, 0.15);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.onboarding-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 179, 0, 0.4);
  box-shadow: 0 8px 20px rgba(255, 179, 0, 0.15);
  background: var(--surface-hover);
}
.onboard-shortcut-badge {
  background: rgba(255, 179, 0, 0.15);
  color: #ffb300;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 179, 0, 0.3);
  align-self: flex-start;
  margin-bottom: 10px;
}

/* 2x2 Matrix styling */
.matrix-container {
  margin: 20px 0;
}
.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.matrix-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}
.matrix-cell.active {
  background: rgba(0, 229, 255, 0.05);
  border: 2px solid rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
  transform: scale(1.02);
}
.matrix-cell.active .matrix-title {
  color: var(--cyan-500);
  font-weight: bold;
}
.matrix-title {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 4px;
}
.matrix-desc {
  font-size: 11px;
  color: #777;
}
.matrix-cell.active .matrix-desc {
  color: #bbf;
}

/* Business Value Scorecard */
.scorecard-row {
  margin-bottom: 12px;
}
.scorecard-label-flex {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.scorecard-bar-bg {
  background: var(--border);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.scorecard-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* HSL Color codes for progress bars */
.fill-time { background: linear-gradient(90deg, #00c6fb 0%, var(--accent) 100%); }
.fill-cost { background: linear-gradient(90deg, #00e676 0%, #00a84f 100%); }
.fill-quality { background: linear-gradient(90deg, #d500f9 0%, #aa00ff 100%); }
.fill-automation { background: linear-gradient(90deg, #ff9100 0%, #ff6d00 100%); }
.fill-strategic { background: linear-gradient(90deg, #ff1744 0%, #d50000 100%); }

/* Roadmap Timeline */
.roadmap-timeline-wrapper {
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  backdrop-filter: blur(10px);
}
.roadmap-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.roadmap-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}
.roadmap-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-strong);
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}
.roadmap-step.active .roadmap-dot {
  background: #ffb300;
  border-color: #ffe082;
  box-shadow: 0 0 15px rgba(255, 179, 0, 0.6);
  color: #000;
  transform: scale(1.2);
}
.roadmap-step-name {
  font-size: 11px;
  color: #777;
  transition: all 0.3s ease;
}
.roadmap-step.active .roadmap-step-name {
  color: #ffb300;
  font-weight: bold;
}
.roadmap-line {
  position: absolute;
  top: 12px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border-strong);
  z-index: 1;
}

/* Recommended Stack Table */
.stack-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.stack-table th, .stack-table td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--surface-hover);
}
.stack-table th {
  color: #aaa;
  font-size: 12px;
  font-weight: normal;
}
.stack-table td {
  font-size: 13px;
  color: var(--gray-0);
}
.stack-role {
  color: var(--gold, #ffb300);
  font-weight: bold;
}

/* Readiness Indicator Badges */
.readiness-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid transparent;
}
.readiness-ready {
  background: rgba(0, 230, 118, 0.12);
  color: #00e676;
  border-color: rgba(0, 230, 118, 0.25);
}
.readiness-basic {
  background: rgba(255, 235, 59, 0.12);
  color: #fdd835;
  border-color: rgba(255, 235, 59, 0.25);
}
.readiness-documentation {
  background: rgba(255, 145, 0, 0.12);
  color: #ff9100;
  border-color: rgba(255, 145, 0, 0.25);
}
.readiness-enterprise {
  background: rgba(255, 23, 68, 0.12);
  color: #ff1744;
  border-color: rgba(255, 23, 68, 0.25);
}

/* Dynamic Copy Button in Card Header */
.copy-starter-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  color: var(--gray-0);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.copy-starter-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--cyan-500);
}

/* Pulse highlight animation for deep linking */
@keyframes cardPulseHighlight {
  0% {
    box-shadow: 0 0 0 rgba(255, 179, 0, 0);
    border-color: var(--border-strong);
  }
  20% {
    box-shadow: 0 0 25px rgba(255, 179, 0, 0.8);
    border-color: rgba(255, 179, 0, 0.9);
    transform: scale(1.03);
  }
  60% {
    box-shadow: 0 0 25px rgba(255, 179, 0, 0.8);
    border-color: rgba(255, 179, 0, 0.9);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 179, 0, 0);
    border-color: var(--border-strong);
  }
}
.card-pulse-highlight {
  animation: cardPulseHighlight 2s ease-in-out 1;
}

/* Usecase Checklist */
.usecase-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #ccc;
  cursor: pointer;
  transition: color 0.2s ease;
}
.usecase-checklist-item:hover {
  color: var(--gray-0);
}
.usecase-checklist-item.checked {
  text-decoration: line-through;
  color: #666;
}
.usecase-checklist-item input {
  cursor: pointer;
  accent-color: var(--gold, #ffb300);
}

/* ==========================================================================
   USE CASES HUB FULL PROFILE LAYOUT STYLES
   ========================================================================== */
.module-split-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 60px;
}
@media (max-width: 1024px) {
  .module-split-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 768px) {
  .module-split-layout {
    display: block !important;
    width: 100% !important;
  }
}

/* Toggle Full Profile Layout */
.module-split-layout.profile-active {
  grid-template-columns: 1fr !important;
  display: block !important;
}
.module-split-layout.profile-active .categories-sidebar-panel {
  display: none !important;
}
.module-split-layout.profile-active .main-content-flow > *:not(#usecase-profile-section) {
  display: none !important;
}

/* ==========================================================================
   AI USE CASES HUB UI/UX REFINEMENTS
   ========================================================================== */

/* 1. Search & Filters Glassmorphism */
#view-usecases .search-filter-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
}

#view-usecases .search-input-wrapper {
  flex: 2;
  min-width: 280px;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  transition: all 0.3s ease;
}

#view-usecases .search-input-wrapper:focus-within {
  border-color: var(--cyan-500);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
  background: var(--surface-hover);
}

#view-usecases .search-input-wrapper .search-icon {
  font-size: 16px;
  margin-left: 10px;
  color: var(--text-secondary);
}

#view-usecases #usecases-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 13px;
}

#view-usecases .filter-dropdown-wrapper {
  flex: 1;
  min-width: 200px;
}

#view-usecases .custom-select-wrapper {
  width: 100%;
}

/* 2. Interactive Filter Cards (Categories Panel) */
#usecases-categories-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#usecases-categories-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#usecases-categories-list li::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  transition: background 0.3s ease;
}

#usecases-categories-list li:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateX(-4px);
}

#usecases-categories-list li.active {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--cyan-500);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

#usecases-categories-list li.active::before {
  background: var(--cyan-500);
}

#usecases-categories-list li span:first-child {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
}

#usecases-categories-list li .count-badge {
  background: var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-weight: bold;
  transition: all 0.3s ease;
}

#usecases-categories-list li.active .count-badge {
  background: var(--cyan-500);
  color: var(--bg-primary);
}

/* 3. Featured Use Cases Grid & Cards */
.featured-usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.featured-uc-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 196, 0, 0.05) 0%, rgba(255, 196, 0, 0.01) 100%);
  border: 1.5px solid rgba(255, 196, 0, 0.2);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(255, 196, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-uc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 196, 0, 0.6);
  box-shadow: 0 8px 25px rgba(255, 196, 0, 0.2);
  background: rgba(255, 196, 0, 0.08);
}

.featured-uc-badge {
  background: rgba(255, 196, 0, 0.15);
  color: var(--warning);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 196, 0, 0.3);
  font-weight: bold;
  align-self: flex-start;
  margin-bottom: 10px;
  font-family: var(--font-arabic);
}

/* 4. Quick Wins Compact Horizontal Scroll Row */
#view-usecases .quick-wins-row {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 8px 4px 16px 4px;
  margin-top: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

#view-usecases .quick-wins-row::-webkit-scrollbar {
  height: 6px;
}

#view-usecases .quick-wins-row::-webkit-scrollbar-track {
  background: transparent;
}

#view-usecases .quick-wins-row::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

#view-usecases .quick-wins-row::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-500);
}

#view-usecases .quick-wins-row .qw-card {
  flex: 0 0 280px;
  min-width: 280px;
}

/* 5. Typography and CTA on Use Case Cards */
#usecases-grid-container .tgc-name {
  font-family: var(--font-arabic);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

#usecases-grid-container .tgc-desc {
  font-family: var(--font-arabic);
  font-size: 12px;
  line-height: 1.7;
  color: #c4d1ec;
  margin-top: 10px;
}

.uc-card-cta-text {
  font-size: 11px;
  color: var(--cyan-500);
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-arabic);
}

.tool-grid-card:hover .uc-card-cta-text {
  color: var(--text-primary);
  transform: translateX(-4px);
}

/* ==========================================================================
   WHALE OS — PREMIUM SaaS SYSTEM FOUNDATION OVERRIDES
   ========================================================================== */



/* 1. Global Container System & scaling */
.container-width {
  max-width: 1720px !important;
  margin: 0 auto !important;
  padding: 0 var(--space-32) !important;
  width: 100% !important;
}
@media (max-width: 1200px) {
  .container-width {
    padding: 0 var(--space-24) !important;
  }
}
@media (max-width: 768px) {
  .container-width {
    padding: 0 var(--space-16) !important;
  }
}

/* 2. Visual Spacing Rhythm & Spacing hierarchy */
.sub-section-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin-top: var(--space-32) !important;
  margin-bottom: var(--space-16) !important;
}

/* 3. Card System Rework (Notion/Linear/Stripe Dashboard style) */
.gateway-card, 
.tool-grid-card, 
.onboarding-card, 
.qw-card, 
.featured-uc-card, 
.learning-path-card, 
.settings-card {
  background: rgba(255, 255, 255, 0.015) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px var(--surface-hover) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

/* Elevated Hover States with scaling & glows */
.gateway-card:hover, 
.tool-grid-card:hover, 
.onboarding-card:hover, 
.qw-card:hover, 
.featured-uc-card:hover, 
.learning-path-card:hover, 
.settings-card:hover {
  transform: translateY(-4px) scale(1.008) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: var(--border-strong) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px var(--border) !important;
}

/* Module Themed Glows */
#view-toolkit .tool-grid-card:hover {
  border-color: rgba(0, 163, 255, 0.4) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 163, 255, 0.2), inset 0 1px 1px var(--border) !important;
}
#view-excel .tool-grid-card:hover {
  border-color: rgba(0, 229, 255, 0.4) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 229, 255, 0.2), inset 0 1px 1px var(--border) !important;
}
#view-prompts .tool-grid-card:hover {
  border-color: rgba(255, 196, 0, 0.4) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 196, 0, 0.2), inset 0 1px 1px var(--border) !important;
}
#view-usecases .tool-grid-card:hover {
  border-color: rgba(0, 163, 255, 0.4) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 163, 255, 0.2), inset 0 1px 1px var(--border) !important;
}

/* 4. Filters & Search Experience Redesign */
.search-filter-controls,
#view-usecases .search-filter-controls {
  background: rgba(255, 255, 255, 0.015) !important;
  border: 1px solid var(--surface-hover) !important;
  border-radius: 16px !important;
  padding: var(--space-16) !important;
  margin-bottom: var(--space-24) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3) !important;
  display: flex;
  gap: var(--space-16);
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrapper,
#view-usecases .search-input-wrapper {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.search-input-wrapper:focus-within,
#view-usecases .search-input-wrapper:focus-within {
  border-color: var(--cyan-500) !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2) !important;
  background: var(--surface-hover) !important;
}

/* 5. Desktop Sidebar experience */
.sidebar-sticky-card {
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.015) !important;
  border: 1px solid var(--surface-hover) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.sidebar-cat-item, 
#usecases-categories-list li {
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Sidebar Hover Slide */
.sidebar-cat-item:hover, 
#usecases-categories-list li:hover {
  background: var(--surface-hover) !important;
  transform: translateX(-6px) !important;
}

/* Premium Sidebar Active Glow Indicator */
.sidebar-cat-item::before, 
#usecases-categories-list li::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 4px !important;
  height: 100% !important;
  background: transparent !important;
  transition: background 0.3s ease !important;
  border-radius: 0 4px 4px 0 !important;
  z-index: 2;
}

.sidebar-cat-item.active::before, 
#usecases-categories-list li.active::before {
  background: var(--cyan-500) !important;
}

.sidebar-cat-item.active {
  background: rgba(0, 163, 255, 0.08) !important;
  border-color: rgba(0, 163, 255, 0.25) !important;
  color: var(--cyan-500) !important;
  font-weight: 700 !important;
}

/* 6. Section Transition Animations */
@keyframes viewTransition {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.view-section {
  display: none;
}

.view-section.active {
  display: block !important;
  animation: viewTransition 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* 7. Dashboard Polish */
.hero-block {
  padding: 80px 0 var(--space-48) 0 !important;
  background: radial-gradient(circle at 50% 30%, var(--accent-soft) 0%, transparent 60%) !important;
  border-bottom: 1px solid var(--surface) !important;
}

.hero-title {
  font-size: 40px !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px !important;
  margin-bottom: var(--space-16) !important;
}

.hero-search-bar {
  border-radius: 14px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  max-width: 540px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-top: var(--space-24) !important;
}

.hero-search-bar:hover {
  background: var(--surface-hover) !important;
  border-color: rgba(0, 229, 255, 0.3) !important;
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08) !important;
}

/* ============================================================
   8. WHALE OS WORKSPACE COMMAND CENTER STYLES
   ============================================================ */

/* Sticky Header Search Entry */
.header-search-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 320px;
  margin: 0 24px;
}

.header-search-entry:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.hse-icon {
  font-size: 14px;
  color: var(--text-secondary);
}

.hse-placeholder {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

.hse-kbd {
  margin-right: auto;
  background: var(--border);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--text-secondary);
  font-family: monospace;
}

/* Header Action Notifications */
.action-notify {
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.action-notify:hover {
  background: var(--border);
  border-color: var(--border-strong);
}

.notify-icon {
  font-size: 16px;
}

.notify-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

/* Home Workspace Layout */
.home-workspace-layout {
  padding-top: var(--space-32);
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
}

/* Snapshot Container */
.workspace-snapshot-container {
  background: linear-gradient(135deg, rgba(2, 4, 16, 0.95) 0%, rgba(10, 15, 30, 0.95) 100%);
  border: 1px solid var(--surface-hover);
  border-radius: 20px;
  padding: var(--space-24) var(--space-32);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 1px var(--surface-hover);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-24);
}

.snapshot-greeting h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-8);
  font-family: var(--font-arabic);
}

.snapshot-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

.snapshot-metrics-grid {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
}

.snapshot-metric-card {
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 12px;
  padding: 12px var(--space-24);
  display: flex;
  align-items: center;
  gap: var(--space-16);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.snapshot-metric-card:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateY(-2px);
}

.sm-icon {
  font-size: 22px;
}

.sm-info {
  display: flex;
  flex-direction: column;
}

.sm-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sm-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-family: var(--font-arabic);
}

/* Continue Learning */
.continue-learning-card {
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  padding: var(--space-24);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 1px var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cl-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-24);
}

.cl-info-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

.cl-icon {
  font-size: 32px;
  width: 64px;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.cl-type {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-heading);
}

.cl-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
}

.cl-progress-wrap {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-progress-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

.cl-progress-track {
  height: 6px;
  background: var(--surface-hover);
  border-radius: 3px;
  overflow: hidden;
}

.cl-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--cyan-500) 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.btn-cl-resume {
  background: linear-gradient(90deg, rgba(0, 163, 255, 0.15) 0%, rgba(0, 229, 255, 0.15) 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--cyan-500);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-arabic);
}

.btn-cl-resume:hover {
  background: linear-gradient(90deg, rgba(0, 163, 255, 0.3) 0%, rgba(0, 229, 255, 0.3) 100%);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
  transform: translateY(-2px);
}

/* Core Modules Grid */
.core-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-24);
}

.module-launcher-card {
  position: relative;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 18px;
  padding: var(--space-24);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.ml-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.module-launcher-card:hover .ml-glow {
  opacity: 1;
}

.module-launcher-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 2px var(--border-strong) inset;
}

.ml-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-16);
}

.ml-icon {
  font-size: 26px;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ml-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cyan-500);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  padding: 2px 8px;
  font-family: var(--font-heading);
}

.ml-badge-active {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--success);
  background: rgba(46, 204, 113, 0.10);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 20px;
  padding: 2px 8px;
  font-family: var(--font-heading);
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.2);
}

.ml-body {
  position: relative;
  z-index: 2;
  flex: 1;
}

.ml-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-8);
  font-family: var(--font-heading);
}

.ml-body p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: var(--font-arabic);
}

.ml-footer {
  position: relative;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan-500);
  margin-top: var(--space-16);
  transition: all 0.3s ease;
  font-family: var(--font-arabic);
}

.module-launcher-card:hover .ml-footer {
  color: var(--text-primary);
  padding-right: 4px;
}

/* Recently Opened & Favorites grids */
.recently-opened-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-24);
}

.recent-workspace-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.recent-workspace-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.rw-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rw-icon {
  font-size: 20px;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rw-time {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

.rw-card-body {
  flex: 1;
}

.rw-type {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-heading);
}

.rw-card-body h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  font-family: var(--font-arabic);
}

.rw-card-footer {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 12px;
  font-family: var(--font-arabic);
}

.recent-workspace-card:hover .rw-card-footer {
  color: var(--cyan-500);
}

.rw-unfav-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--warning);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.rw-unfav-btn:hover {
  transform: scale(1.2);
}

/* Latest Updates Timeline */
.updates-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
}

.update-timeline-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  padding: var(--space-24);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.utc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-16);
}

.utc-badge {
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: var(--font-arabic);
}

.badge-new {
  color: var(--cyan-500);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.badge-prompt {
  color: var(--warning);
  background: rgba(255, 196, 0, 0.08);
  border: 1px solid rgba(255, 196, 0, 0.2);
}

.badge-usecase {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 93, 255, 0.2);
}

.utc-date {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

.utc-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-8);
  font-family: var(--font-arabic);
}

.utc-body p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: var(--font-arabic);
}

/* Recommended Placeholder Grid */
.recommended-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-24);
}

.rec-placeholder-card {
  position: relative;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: var(--space-24);
  min-height: 120px;
  display: flex;
  align-items: center;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.rpc-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 8px;
  padding: 3px 8px;
  font-family: var(--font-arabic);
}

.rpc-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-8);
  font-family: var(--font-arabic);
}

.rpc-body p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  font-family: var(--font-arabic);
}

/* Empty State Card */
.empty-state-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-arabic);
}

/* RESPONSIVE LAYOUT OVERRIDES */
@media (max-width: 1200px) {
  .core-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .recently-opened-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .updates-timeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .core-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .role-selector-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .header-search-entry {
    display: none; /* Hidden on mobile header, search icon triggers search */
  }
  .workspace-snapshot-container {
    padding: var(--space-16);
    flex-direction: column;
    align-items: flex-start;
  }
  .snapshot-metrics-grid {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }
  .snapshot-metric-card {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    justify-content: center;
  }
  .sm-label {
    font-size: 9px;
    word-break: break-word;
    line-height: 1.3;
  }
  .sm-value {
    font-size: 16px;
  }
  .cl-card-body {
    flex-direction: column;
    align-items: stretch;
  }
  .cl-progress-wrap {
    min-width: 100%;
  }
  .btn-cl-resume {
    width: 100%;
    text-align: center;
  }
  .core-modules-grid {
    grid-template-columns: 1fr;
  }
  .recently-opened-grid {
    grid-template-columns: 1fr;
  }
  .updates-timeline-grid {
    grid-template-columns: 1fr;
  }
  .role-selector-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }
  .role-selector-bar select {
    width: 100%;
  }
  .quick-actions-bar {
    gap: 8px;
  }
  .qa-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================================
   WHALE OS WORKSPACE, PROJECT & WORKFLOW ENGINE STYLES (PHASE 2.7)
   ============================================================ */

.global-nav-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--surface-hover);
  margin-bottom: 24px;
  border-radius: 12px;
  font-family: var(--font-arabic);
  direction: rtl;
}

.breadcrumbs-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bc-item {
  cursor: pointer;
  transition: color 0.2s ease;
}

.bc-item:hover {
  color: var(--cyan-500);
}

.bc-item.active {
  color: var(--text-primary);
  font-weight: bold;
  cursor: default;
}

.bc-sep {
  color: var(--border-strong);
  font-size: 14px;
}

.nav-back-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-family: var(--font-arabic);
}

.nav-back-btn:hover {
  background: rgba(0, 163, 255, 0.1);
  border-color: var(--cyan-500);
  color: var(--cyan-500);
}

/* Role Selector & Quick Actions */
.role-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 12px;
  margin-bottom: 20px;
  font-family: var(--font-arabic);
  direction: rtl;
  flex-wrap: wrap;
}

.role-selector-bar label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.role-selector-bar select {
  padding: 8px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  font-size: 13px;
  font-family: var(--font-arabic);
  cursor: pointer;
}

.quick-actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  direction: rtl;
  font-family: var(--font-arabic);
}

.qa-btn {
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-family: var(--font-arabic);
}

.qa-btn:hover {
  background: var(--border);
  border-color: var(--border-strong);
}

.qa-btn-accent {
  background: rgba(0, 163, 255, 0.15);
  border-color: rgba(0, 163, 255, 0.3);
  color: var(--cyan-500);
  font-weight: bold;
}

.qa-btn-accent:hover {
  background: rgba(0, 163, 255, 0.25);
  border-color: var(--cyan-500);
}

.btn-danger {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.3);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: var(--danger);
}

/* Active Cards styling */
.os-card-wrapper {
  margin-bottom: 24px;
  direction: rtl;
  font-family: var(--font-arabic);
}

.os-interactive-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px var(--surface-hover);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: right;
}

.os-interactive-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 163, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 163, 255, 0.05);
}

.os-card-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 163, 255, 0.08);
  border: 1px solid rgba(0, 163, 255, 0.2);
  color: var(--cyan-500);
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 12px;
}

.workspace-home-card {
  border-right: 4px solid var(--cyan-500);
}

.project-home-card {
  border-right: 4px solid var(--warning);
}

.workflow-home-card {
  border-right: 4px solid var(--green);
}

.os-card-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--surface-hover);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0 6px 0;
}

.os-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.project-home-card .os-bar-fill {
  background: linear-gradient(90deg, #ffc107, #ff9800);
}

.workflow-home-card .os-bar-fill {
  background: linear-gradient(90deg, var(--success), #27ae60);
}

.os-progress-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.os-card-action-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-arabic);
  transition: all 0.2s ease;
}

.os-card-action-btn:hover {
  background: var(--border);
}

.os-card-action-btn.btn-secondary {
  background: rgba(255, 255, 255, 0.01);
  border-color: var(--surface-hover);
  color: var(--text-secondary);
}

/* Suggested recommendations box */
.sug-layout-box {
  padding: 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  margin-bottom: 30px;
  direction: rtl;
  font-family: var(--font-arabic);
  text-align: right;
}

.sug-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.sug-grids-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sug-column h4 {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 8px;
}

.suggested-workspace-row, .suggested-project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.suggested-workspace-row:hover, .suggested-project-row:hover {
  background: rgba(0, 163, 255, 0.05);
  border-color: rgba(0, 163, 255, 0.15);
}

.sug-action-link {
  background: none;
  border: none;
  color: var(--cyan-500);
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
  font-family: var(--font-arabic);
}

/* Workspace Views */
.workspace-view-header {
  margin-bottom: 30px;
  direction: rtl;
  font-family: var(--font-arabic);
  text-align: right;
}

.workspace-progress-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(0, 163, 255, 0.03);
  border: 1px solid rgba(0, 163, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 30px;
  direction: rtl;
  font-family: var(--font-arabic);
}

.wpb-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: bold;
}

.wpb-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-hover);
  border-radius: 4px;
  overflow: hidden;
}

.wpb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-500), #00ffb2);
}

.wpb-val {
  font-size: 16px;
  color: var(--cyan-500);
  font-weight: bold;
}

.workspace-section-block {
  margin-bottom: 40px;
  direction: rtl;
  font-family: var(--font-arabic);
  text-align: right;
}

.wsb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 10px;
}

.workspace-projects-list {
  display: grid;
  gap: 16px;
}

.workspace-project-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workspace-project-row-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 163, 255, 0.2);
  background: var(--surface);
}

.wpr-info h4 {
  margin: 0 0 6px 0;
  color: var(--text-primary);
  font-size: 15px;
}

.wpr-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.wpr-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 250px;
}

.wpr-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-hover);
  border-radius: 3px;
  overflow: hidden;
}

.wpr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffc107, #ff9800);
}

.wpr-progress-val {
  font-size: 13px;
  color: var(--warning);
  font-weight: bold;
  width: 35px;
  text-align: left;
}

.wpr-open-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-arabic);
}

.workspace-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.workspace-template-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.workspace-template-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 163, 255, 0.2);
  background: var(--surface);
}

.wtc-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.wtc-launch-btn {
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(0, 163, 255, 0.1);
  border: 1px solid rgba(0, 163, 255, 0.2);
  border-radius: 8px;
  color: var(--cyan-500);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-arabic);
}

.wtc-launch-btn:hover {
  background: rgba(0, 163, 255, 0.2);
}

/* Project Dashboard */
.project-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  direction: rtl;
  font-family: var(--font-arabic);
  text-align: right;
}

.proj-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.proj-status-badge.status-active {
  background: rgba(0, 163, 255, 0.08);
  color: var(--cyan-500);
  border: 1px solid rgba(0, 163, 255, 0.2);
}

.proj-status-badge.status-completed {
  background: rgba(46, 204, 113, 0.08);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.proj-status-badge.status-paused {
  background: rgba(241, 196, 15, 0.08);
  color: var(--warning);
  border: 1px solid rgba(241, 196, 15, 0.2);
}

.proj-status-badge.status-archived {
  background: rgba(149, 165, 166, 0.08);
  color: #95a5a6;
  border: 1px solid rgba(149, 165, 166, 0.2);
}

.pvh-actions {
  display: flex;
  gap: 10px;
}

.project-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  direction: rtl;
  font-family: var(--font-arabic);
  text-align: right;
}

.project-progress-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  margin-bottom: 24px;
}

.ppc-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.ppc-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-hover);
  border-radius: 4px;
  overflow: hidden;
}

.ppc-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffc107, #ff9800);
}

.project-workflows-deck {
  display: grid;
  gap: 24px;
}

.pworkflow-card {
  border: 1px solid var(--surface-hover);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 16px;
  overflow: hidden;
}

.pwf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-hover);
}

.pwf-prog {
  font-size: 14px;
  color: var(--cyan-500);
  font-weight: bold;
}

.pwf-body {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.pstep-row {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-hover);
}

.pstep-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.pstep-status-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pstep-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
}

.badge-completed {
  background: rgba(46, 204, 113, 0.08);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.badge-pending {
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pstep-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.pstep-assets-dock {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pstep-asset-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-arabic);
}

.pstep-asset-btn:hover {
  background: var(--border);
  border-color: var(--border-strong);
}

.btn-uc {
  background: rgba(0, 163, 255, 0.05);
  border-color: rgba(0, 163, 255, 0.15);
  color: var(--cyan-500);
}

.btn-pr {
  background: rgba(255, 196, 0, 0.05);
  border-color: rgba(255, 196, 0, 0.15);
  color: var(--warning);
}

.btn-calc {
  background: rgba(46, 204, 113, 0.05);
  border-color: rgba(46, 204, 113, 0.15);
  color: var(--success);
}

.btn-tool {
  background: rgba(0, 229, 255, 0.05);
  border-color: rgba(0, 229, 255, 0.15);
  color: var(--cyan-500);
}

/* Sidebar styling */
.proj-sidebar-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--surface-hover);
  border-radius: 16px;
  margin-bottom: 24px;
}

.proj-sidebar-card h3 {
  font-size: 14px;
  margin: 0 0 12px 0;
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 8px;
  color: var(--text-primary);
}

.proj-var-field-row {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proj-var-field-row label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: bold;
}

.pvar-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-arabic);
}

.pvar-input:focus {
  border-color: var(--cyan-500);
}

.proj-notes-textarea {
  width: 100%;
  height: 120px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  resize: none;
  outline: none;
  line-height: 1.5;
  transition: border-color 0.2s;
  font-family: var(--font-arabic);
}

.proj-notes-textarea:focus {
  border-color: var(--cyan-500);
}

.pactivity-timeline-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.01);
  border-left: 2px solid var(--cyan-500);
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}

.pact-time {
  color: var(--cyan-500);
  margin-left: 8px;
  font-weight: bold;
}

/* Modals styling */
.os-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 4, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  font-family: var(--font-arabic);
}

.os-modal-content {
  width: 90%;
  max-width: 500px;
  background: rgba(11, 17, 44, 0.95);
  border: 1px solid rgba(0, 163, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 10px 45px rgba(0,0,0,0.6), 0 0 25px rgba(0, 163, 255, 0.1);
  overflow: hidden;
}

.os-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--surface-hover);
}

.os-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.os-modal-body {
  padding: 24px;
}

.os-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--surface-hover);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--text-primary);
  margin-top: 12px;
}

.modal-input, .modal-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  margin-bottom: 12px;
  font-family: var(--font-arabic);
}

.modal-select option {
  background: #0b112c;
  color: var(--text-primary);
}

/* Floating Return Overlays */
.floating-overlays-container {
  position: fixed;
  bottom: 80px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.floating-overlay-btn {
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0, 163, 255, 0.2);
  background: rgba(2, 11, 61, 0.9);
  backdrop-filter: blur(8px);
  color: var(--cyan-500);
  font-family: var(--font-arabic);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.floating-overlay-btn:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-500);
  background: rgba(0, 163, 255, 0.15);
}



/* ============================================================
   PHASE 2.8  RESOURCE PREVIEW PANEL + ENHANCED TOAST
   ============================================================ */

/* --- Enhanced Toast System --- */
.whale-toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(8, 10, 28, 0.96);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  color: var(--gray-0);
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-family: var(--font-arabic);
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275), opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
  white-space: nowrap;
  opacity: 0;
  max-width: 90vw;
}
.whale-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.whale-toast.toast-success { border-color: rgba(46,204,113,0.4); }
.whale-toast.toast-warning { border-color: rgba(241,196,15,0.4); }
.whale-toast.toast-error   { border-color: rgba(231,76,60,0.4); }
.whale-toast.toast-info    { border-color: rgba(0,163,255,0.4); }
.whale-toast-icon { font-size: 15px; flex-shrink: 0; }
.whale-toast-msg  { font-size: 13px; line-height: 1.4; }

/* --- Resource Preview Panel Overlay --- */
.rp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 9980;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.3s ease;
}
.rp-overlay.open {
  opacity: 1;
  pointer-events: all;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

/* --- Resource Preview Panel --- */
.rp-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 92vw;
  height: 100vh;
  background: linear-gradient(160deg, rgba(8,10,28,0.98) 0%, rgba(12,15,40,0.99) 100%);
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -20px 0 60px rgba(0,0,0,0.7);
  z-index: 9990;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.32,0.72,0,1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rp-panel.open {
  transform: translateX(0);
}
.rp-panel-inner {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 40px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* --- Panel Header --- */
.rp-header {
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, rgba(0,93,255,0.06) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.rp-header-left {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.rp-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 4px 12px;
  border-radius: 100px;
  font-family: var(--font-heading);
  background: rgba(0,163,255,0.1);
  border: 1px solid rgba(0,163,255,0.25);
  color: var(--accent);
}
.rp-type-badge.badge-tool     { background:rgba(0,229,255,0.08); border-color:rgba(0,229,255,0.2); color:var(--cyan-500); }
.rp-type-badge.badge-prompt   { background:rgba(255,196,0,0.08); border-color:rgba(255,196,0,0.2); color:var(--warning); }
.rp-type-badge.badge-usecase  { background:rgba(0,93,255,0.08);  border-color:rgba(0,93,255,0.2);  color:var(--accent); }
.rp-type-badge.badge-excel    { background:rgba(46,204,113,0.08);border-color:rgba(46,204,113,0.2);color:var(--success); }
.rp-type-badge.badge-formula  { background:rgba(46,204,113,0.08);border-color:rgba(46,204,113,0.2);color:var(--success); }
.rp-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.rp-close-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--gray-0);
  transform: scale(1.1);
}
.rp-icon-large {
  font-size: 36px;
  margin-bottom: 12px;
  line-height: 1;
}
.rp-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-0);
  line-height: 1.35;
  margin: 0 0 6px 0;
  font-family: var(--font-arabic);
  direction: rtl;
}
.rp-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin: 0;
  line-height: 1.5;
  font-family: var(--font-arabic);
  direction: rtl;
}

/* --- Meta Row --- */
.rp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  direction: rtl;
}
.rp-meta-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-arabic);
}
.rp-meta-chip .mc-icon { font-size: 12px; }

/* --- Section Base --- */
.rp-section {
  padding: 18px 24px 0;
}
.rp-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
  font-family: var(--font-heading);
}
.rp-description {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin: 0;
  font-family: var(--font-arabic);
  direction: rtl;
}
.rp-outcome-text {
  color: rgba(46,204,113,0.9);
  background: rgba(46,204,113,0.04);
  padding: 10px 14px;
  border-radius: 8px;
  border-right: 3px solid rgba(46,204,113,0.4);
}

/* --- Related Resources Grid --- */
.rp-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  direction: rtl;
}
.rp-related-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
  font-family: var(--font-arabic);
  min-width: 0;
}
.rp-related-chip:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
.rp-related-chip.rc-tool    { border-left: 2px solid rgba(0,229,255,0.3); }
.rp-related-chip.rc-prompt  { border-left: 2px solid rgba(255,196,0,0.3); }
.rp-related-chip.rc-usecase { border-left: 2px solid rgba(0,93,255,0.3); }
.rp-related-chip.rc-excel   { border-left: 2px solid rgba(46,204,113,0.3); }
.rp-related-chip-icon { font-size: 16px; flex-shrink: 0; }
.rp-related-chip-text {
  font-size: 11.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* --- Action Buttons --- */
.rp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px;
}
.rp-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan-500) 100%);
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.25s ease;
  direction: rtl;
  width: 100%;
  text-align: center;
}
.rp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,163,255,0.35);
}
.rp-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.2s ease;
  direction: rtl;
  width: 100%;
  text-align: center;
}
.rp-btn-secondary:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  color: var(--gray-0);
}

/* --- Scrollbar for panel --- */
.rp-panel-inner::-webkit-scrollbar { width: 4px; }
.rp-panel-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.rp-panel-inner::-webkit-scrollbar-track { background: transparent; }

/* --- Mobile adjustments --- */
@media (max-width: 480px) {
  .rp-panel { width: 100vw; max-width: 100vw; }
  .rp-related-grid { grid-template-columns: 1fr; }
}

.step-activities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  direction: rtl;
}

.activity-item:hover {
  background: rgba(0, 198, 251, 0.05);
  border-color: rgba(0, 198, 251, 0.2);
}

.activity-item.completed {
  background: rgba(46, 204, 113, 0.04);
  border-color: rgba(46, 204, 113, 0.2);
  opacity: 0.8;
}

.activity-item.completed .activity-title {
  text-decoration: line-through;
  opacity: 0.6;
}

.activity-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.activity-item.completed .activity-checkbox {
  background: var(--success);
  border-color: var(--success);
}

.activity-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-0);
  margin-bottom: 2px;
  font-family: 'Cairo', sans-serif;
}

.activity-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-family: 'Cairo', sans-serif;
}

.activity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.activity-time {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.activity-action-btn {
  padding: 5px 12px;
  background: var(--glow-sm);
  border: 1px solid rgba(0, 93, 255, 0.3);
  border-radius: 6px;
  color: #5b9aff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: 'Cairo', sans-serif;
}

.activity-action-btn:hover {
  background: rgba(0, 93, 255, 0.3);
}

@media (max-width: 768px) {
  .activity-item {
    grid-template-columns: 28px 1fr;
    grid-template-rows: auto auto;
  }

  .activity-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* --- Activities Intelligence Layer Additions --- */
.cl-split-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.cl-split-divider {
  background: var(--border);
  width: 1px;
  height: 100%;
}

.continue-learning-card.split-layout {
  padding: 20px;
  background: rgba(11, 20, 55, 0.6);
  border: 1px solid var(--border);
}

.activity-outcome {
  font-size: 11px;
  color: var(--success);
  margin-top: 4px;
  font-family: 'Cairo', sans-serif;
  font-weight: 500;
}

.activity-item.completed .activity-outcome {
  opacity: 0.5;
  text-decoration: none !important;
}

.ppc-activity-counter {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 8px;
  font-family: 'Cairo', sans-serif;
}

.pwf-activity-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: 'Cairo', sans-serif;
}

.continue-project-widget {
  background: linear-gradient(135deg, rgba(11, 20, 55, 0.8) 0%, rgba(20, 32, 85, 0.8) 100%);
  border: 1px solid rgba(0, 198, 251, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  direction: rtl;
}

.continue-project-widget.project-completed-banner {
  border-color: rgba(46, 204, 113, 0.3);
  background: linear-gradient(135deg, rgba(11, 55, 20, 0.8) 0%, rgba(20, 85, 32, 0.8) 100%);
}

.cpw-header {
  font-size: 15px;
  font-weight: 800;
  color: #00c6fb;
  margin-bottom: 12px;
  font-family: 'Cairo', sans-serif;
}

.cpw-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cpw-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-0);
  border-bottom: 1px solid var(--surface-hover);
  padding-bottom: 6px;
  font-family: 'Cairo', sans-serif;
}

.cpw-row span {
  color: var(--text-secondary);
}

.cpw-action-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Cairo', sans-serif;
  text-align: center;
}

.cpw-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 198, 251, 0.3);
}

@media (max-width: 768px) {
  .cl-split-grid {
    grid-template-columns: 1fr;
  }
  .cl-split-divider {
    width: 100%;
    height: 1px;
    margin: 10px 0;
  }
}

.core-modules-wrapper {
  margin-top: 32px;
}

.core-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.wf-canvas-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}

.wf-canvas-step-card:hover {
  border-color: rgba(0, 198, 251, 0.2);
}

.wf-canvas-step-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-0);
  margin-bottom: 6px;
  font-family: 'Cairo', sans-serif;
}

.wf-canvas-step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  font-family: 'Cairo', sans-serif;
}

.activity-outcome {
  font-size: 11px;
  color: rgba(0, 198, 251, 0.7);
  margin-top: 4px;
  font-family: 'Cairo', sans-serif;
}

@media (max-width: 768px) {
  .core-modules-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wf-canvas-step-card {
    padding: 14px 16px;
  }
}

.admin-tab-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 8px;
  color: var(--text-secondary);
  text-align: right;
  font-family: Cairo, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.admin-tab-btn:hover {
  background: rgba(0, 198, 251, 0.08);
  border-color: rgba(0, 198, 251, 0.2);
  color: var(--gray-0);
}
.admin-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 198, 251, 0.2) 0%, rgba(0, 93, 255, 0.2) 100%);
  border-color: rgba(0, 198, 251, 0.4);
  color: var(--gray-0);
  font-weight: bold;
}


/* ============================================================
   HOME COMMAND CENTER V2 — STYLES
   Phase 2: Layout, Hero, Projects, Modules, Workspaces, Rail
   ============================================================ */

/* ─── Layout: Two-Column Grid ─── */
.home-v2-layout {
  padding-top: 32px;
  padding-bottom: 80px;
}

.home-v2-columns {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.home-v2-left {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.home-v2-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}
.home-v2-rail::-webkit-scrollbar { width: 4px; }
.home-v2-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ─── Section Container ─── */
.hv2-section {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 24px;
}

.hv2-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.hv2-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0;
  letter-spacing: 0;
}

.hv2-header-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan-500);
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font-arabic);
  transition: all 0.2s ease;
}
.hv2-header-action:hover {
  background: rgba(0,229,255,0.15);
  border-color: rgba(0,229,255,0.35);
}

/* ─── Hero Command Zone ─── */
.hv2-hero-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}

.hv2-hero-greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.hv2-hero-greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0;
}

.hv2-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan-500);
  background: rgba(0,198,251,0.1);
  border: 1px solid rgba(0,198,251,0.22);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: var(--font-arabic);
  flex-shrink: 0;
}

.hv2-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
.hv2-status-dot.dot-idle { background: rgba(255,255,255,0.3); animation: none; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hv2-hero-context {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0 0 20px 0;
}

.hv2-hero-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 20px;
}

/* ─── Next Action Banner (the dominant element) ─── */
.hv2-next-action-banner {
  background: rgba(0,93,255,0.07);
  border: 1px solid rgba(0,93,255,0.2);
  border-right: 3px solid var(--accent);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.hv2-nab-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--warning);
  font-family: var(--font-heading);
  display: block;
  margin-bottom: 10px;
}

.hv2-nab-step {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.hv2-nab-context {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0 0 18px 0;
  line-height: 1.6;
}

.hv2-nab-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hv2-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.hv2-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,93,255,0.3);
}

.hv2-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.2s ease;
}
.hv2-btn-secondary:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

/* Hero empty / new user state */
.hv2-hero-onboarding {
  text-align: center;
  padding: 8px 0 4px;
}
.hv2-hero-onboarding h3 {
  font-size: 18px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0 0 8px;
}
.hv2-hero-onboarding p {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0 0 20px;
  line-height: 1.7;
}
.hv2-onboarding-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hv2-step-chip {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-arabic);
}

/* ─── My Projects — Tabs ─── */
.hv2-tabs-bar {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.hv2-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.hv2-tab:hover { color: var(--text-primary); }
.hv2-tab.active {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
}

.hv2-tab-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,229,255,0.15);
  color: var(--cyan-500);
  border-radius: 10px;
  padding: 1px 7px;
  font-family: var(--font-heading);
}

.hv2-tab-panel { /* no extra style needed, section container provides it */ }

/* ─── My Projects — Project Card ─── */
.hv2-project-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}
.hv2-project-card:last-child { margin-bottom: 0; }
.hv2-project-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.hv2-pc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.hv2-pc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0;
}

.hv2-pc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 12px;
  padding: 3px 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-heading);
  flex-shrink: 0;
}
.hv2-pc-status.status-active { background: rgba(46,204,113,0.12); color: var(--success); }
.hv2-pc-status.status-paused { background: rgba(255,196,0,0.12); color: var(--warning); }
.hv2-pc-status.status-system { background: rgba(0,229,255,0.1); color: var(--cyan-500); }

.hv2-pc-workspace {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0 0 14px 0;
}

/* Progress bar */
.hv2-progress-track {
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  margin-bottom: 6px;
  overflow: hidden;
}
.hv2-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-500), var(--accent));
  border-radius: 4px;
  transition: width 0.6s ease-out;
}
.hv2-progress-pct {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  margin-bottom: 14px;
  display: block;
}

.hv2-pc-next {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cyan-500);
  font-family: var(--font-arabic);
  margin-bottom: 16px;
  background: rgba(0,229,255,0.05);
  border-radius: 7px;
  padding: 8px 12px;
}
.hv2-pc-next-label { font-size: 10px; color: var(--warning); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; font-family: var(--font-heading); }

.hv2-pc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hv2-pc-btn {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-arabic);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.2s ease;
}
.hv2-pc-btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.hv2-pc-btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.hv2-pc-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.1);
}
.hv2-pc-btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }

/* Empty state */
.hv2-empty-state {
  padding: 28px 20px;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.1);
}
.hv2-empty-state h4 {
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0 0 8px;
  font-weight: 600;
}
.hv2-empty-state p {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0 0 16px;
  line-height: 1.6;
}

/* ─── Core Module Launchers (V2) ─── */
.hv2-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.hv2-module-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.hv2-module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.14);
}

/* Module accent colors */
.hv2-module-usecases:hover { border-color: rgba(0,93,255,0.4); box-shadow: 0 4px 20px rgba(0,93,255,0.12); }
.hv2-module-prompts:hover { border-color: rgba(255,196,0,0.35); box-shadow: 0 4px 20px rgba(255,196,0,0.1); }
.hv2-module-excel:hover { border-color: rgba(0,196,140,0.4); box-shadow: 0 4px 20px rgba(0,196,140,0.1); }
.hv2-module-toolkit:hover { border-color: rgba(0,229,255,0.4); box-shadow: 0 4px 20px rgba(0,229,255,0.1); }

.hvm-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.hvm-icon-usecases { background: rgba(0,93,255,0.15); }
.hvm-icon-prompts { background: rgba(255,196,0,0.15); }
.hvm-icon-excel { background: rgba(0,196,140,0.15); }
.hvm-icon-toolkit { background: rgba(0,229,255,0.12); }

.hvm-body { flex: 1; }
.hvm-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
  margin: 0 0 5px;
  line-height: 1.2;
}
.hvm-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0;
  line-height: 1.5;
}
.hvm-footer {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-arabic);
  font-weight: 600;
  margin-top: auto;
}

/* ─── Workspaces Grid (V2) ─── */
.hv2-workspaces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hv2-ws-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  border-right-width: 3px; /* domain accent goes on right in RTL */
  position: relative;
  overflow: hidden;
}
.hv2-ws-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.035);
}

/* Domain accent colors */
.hv2-ws-recruitment { border-right-color: var(--accent); }
.hv2-ws-recruitment:hover { box-shadow: 0 4px 20px rgba(0,93,255,0.15); }

.hv2-ws-payroll { border-right-color: var(--warning); }
.hv2-ws-payroll:hover { box-shadow: 0 4px 20px rgba(255,196,0,0.12); }

.hv2-ws-onboarding { border-right-color: #00C48C; }
.hv2-ws-onboarding:hover { box-shadow: 0 4px 20px rgba(0,196,140,0.12); }

.hv2-ws-ld { border-right-color: var(--cyan-500); }
.hv2-ws-ld:hover { box-shadow: 0 4px 20px rgba(0,229,255,0.12); }

.hv2-ws-performance { border-right-color: #FF6B35; }
.hv2-ws-performance:hover { box-shadow: 0 4px 20px rgba(255,107,53,0.12); }

.hv2-ws-icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.hv2-ws-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0 0 5px;
}
.hv2-ws-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin: 0 0 12px;
  line-height: 1.5;
}
.hv2-ws-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hv2-ws-stat {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  display: flex;
  align-items: center;
  gap: 4px;
}
.hv2-ws-stat strong { color: var(--text-primary); font-weight: 700; }
.hv2-ws-badge-recommended {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--warning);
  background: rgba(255,196,0,0.12);
  border: 1px solid rgba(255,196,0,0.2);
  border-radius: 10px;
  padding: 2px 8px;
  margin-bottom: 10px;
  font-family: var(--font-arabic);
}
.hv2-ws-cta {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-arabic);
  font-weight: 600;
}

/* ─── Recommendations Toggle ─── */
.hv2-recommendations-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-arabic);
}
.hv2-recommendations-toggle:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

.hvr-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-arabic);
}

.hvr-role-chip {
  font-size: 11px;
  color: var(--cyan-500);
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.18);
  border-radius: 10px;
  padding: 2px 10px;
  font-family: var(--font-arabic);
}

.hvr-chevron {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-weight: 600;
  transition: color 0.2s;
}
.hv2-recommendations-toggle:hover .hvr-chevron { color: var(--cyan-500); }

.hv2-recommendations-body {
  margin-top: 12px;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  animation: fadeInDown 0.25s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Right Rail Widgets ─── */
.hvr-widget {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 16px;
}

.hvr-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hvr-widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
}

.hvr-see-all {
  display: block;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-arabic);
  cursor: pointer;
  margin-top: 12px;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}
.hvr-see-all:hover { color: var(--cyan-500); }

.hvr-see-all-inline {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: color 0.2s;
}
.hvr-see-all-inline:hover { color: var(--cyan-500); }

/* Continue Learning Cards */
.hvr-cl-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hvr-cl-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hvr-cl-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(-2px);
}

.hvr-cl-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  margin-bottom: 6px;
  display: block;
}

.hvr-cl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  margin: 0 0 8px;
  line-height: 1.4;
}

.hvr-cl-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hvr-cl-type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: var(--font-heading);
}
.hvr-badge-toolkit { background: rgba(0,229,255,0.1); color: var(--cyan-500); }
.hvr-badge-prompts { background: rgba(255,196,0,0.1); color: var(--warning); }
.hvr-badge-excel { background: rgba(0,196,140,0.1); color: #00C48C; }
.hvr-badge-usecases { background: rgba(0,93,255,0.15); color: #6B9FFF; }

.hvr-cl-action {
  font-size: 11px;
  color: var(--cyan-500);
  font-family: var(--font-arabic);
  font-weight: 600;
}

/* Activity Timeline */
.hvr-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hvr-day-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  text-transform: uppercase;
  padding: 8px 0 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
}

.hvr-timeline-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hvr-timeline-entry:last-child { border-bottom: none; }

.hvr-te-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.hvr-te-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  line-height: 1.5;
  flex: 1;
}
.hvr-te-text strong { color: var(--text-primary); font-weight: 600; }

.hvr-te-time {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  flex-shrink: 0;
}

/* Favorites Tray */
.hvr-favorites-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hvr-fav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.hvr-fav-item:hover { background: rgba(255,255,255,0.045); transform: translateX(-2px); }

.hvr-fav-icon { font-size: 16px; flex-shrink: 0; }

.hvr-fav-name {
  font-size: 12px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hvr-fav-type {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* ─── Mobile Responsive ─── */
@media (max-width: 1200px) {
  .home-v2-columns {
    grid-template-columns: 1fr 320px;
    gap: 24px;
  }
  .hv2-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hv2-workspaces-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .home-v2-columns {
    grid-template-columns: 1fr;
  }
  .home-v2-rail {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  /* On tablet: rail becomes a horizontal strip of 3 widgets */
  .home-v2-rail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .home-v2-layout { padding-top: 20px; }
  .home-v2-columns { gap: 20px; }
  .home-v2-left { gap: 20px; }
  .home-v2-rail { grid-template-columns: 1fr; }

  .hv2-modules-grid { grid-template-columns: repeat(2, 1fr); }
  .hv2-workspaces-grid { grid-template-columns: 1fr; }

  .hv2-hero-card { padding: 20px; }
  .hv2-hero-greeting { font-size: 18px; }
  .hv2-nab-step { font-size: 17px; }

  .hv2-section { padding: 18px 16px; }

  .hv2-tabs-bar { padding: 3px; }
  .hv2-tab { font-size: 12px; padding: 7px 8px; }
}

@media (max-width: 480px) {
  .hv2-modules-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hv2-nab-actions { flex-direction: column; }
  .hv2-btn-primary, .hv2-btn-secondary { width: 100%; justify-content: center; }
}


/* ============================================================
   HOME V2 AMENDMENTS
   1. Hero: Mission Status Widget
   2. Core Modules: Premium Engine Cards
   ============================================================ */

/* ─── Amendment 1: Mission Status Widget ─── */

.hv2-hero-body-split {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
}

.hv2-mission-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 8px;
  border-radius: 14px;
  transition: all 0.25s ease;
  text-align: center;
}
.hv2-mission-widget:hover {
  background: rgba(255,255,255,0.03);
}

.hv2-mw-ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.hv2-ring-svg { display: block; }

.hv2-ring-arc {
  transition: stroke-dashoffset 0.8s ease-out;
  filter: drop-shadow(0 0 6px currentColor);
}

.hv2-mw-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.hv2-mw-pct {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-heading);
  line-height: 1;
}

.hv2-mw-status-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.hv2-mw-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

.hv2-mw-proj-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  text-align: center;
  line-height: 1.3;
}

.hv2-mw-step-count {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  text-align: center;
}

.hv2-mw-ws {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  text-align: center;
}

/* Return state widget */
.hv2-mw-return {
  justify-content: center;
}

.hv2-mw-icon-large {
  font-size: 40px;
  margin-bottom: 4px;
}

/* Boot widget for new users */
.hv2-mw-boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.hv2-boot-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(0,229,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: rgba(0,229,255,0.05);
  animation: boot-pulse 3s ease-in-out infinite;
}

@keyframes boot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0.15); }
  50% { box-shadow: 0 0 0 12px rgba(0,229,255,0); }
}

.hv2-boot-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan-500);
  font-family: var(--font-heading);
}

.hv2-boot-sub {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

/* Next action in split layout */
.hv2-nab-flex {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hv2-nab-flex .hv2-nab-label { margin-bottom: 2px; }
.hv2-nab-flex .hv2-nab-step { margin-bottom: 4px; }
.hv2-nab-flex .hv2-nab-context { margin-bottom: 6px; }

/* ─── Amendment 2: Premium Core Module Engine Cards ─── */

/* Override the existing module card for premium treatment */
.hv2-module-card {
  background: rgba(255,255,255,0.025) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 16px !important;
  padding: 22px 18px !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 160px !important;
}

/* Premium inner glow per module — always-on subtle version */
.hv2-module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hv2-module-usecases::before { background: radial-gradient(ellipse at 30% 0%, rgba(0,93,255,0.18) 0%, transparent 65%); }
.hv2-module-prompts::before  { background: radial-gradient(ellipse at 30% 0%, rgba(255,196,0,0.16) 0%, transparent 65%); }
.hv2-module-excel::before    { background: radial-gradient(ellipse at 30% 0%, rgba(0,196,140,0.18) 0%, transparent 65%); }
.hv2-module-toolkit::before  { background: radial-gradient(ellipse at 30% 0%, rgba(0,229,255,0.15) 0%, transparent 65%); }

.hv2-module-card:hover::before { opacity: 1; }

/* Premium hover lift + border glow */
.hv2-module-usecases:hover { border-color: rgba(0,93,255,0.5) !important; box-shadow: 0 8px 32px rgba(0,93,255,0.18), 0 0 0 1px rgba(0,93,255,0.12) !important; transform: translateY(-3px) !important; }
.hv2-module-prompts:hover  { border-color: rgba(255,196,0,0.45) !important; box-shadow: 0 8px 32px rgba(255,196,0,0.14), 0 0 0 1px rgba(255,196,0,0.1) !important; transform: translateY(-3px) !important; }
.hv2-module-excel:hover    { border-color: rgba(0,196,140,0.5) !important; box-shadow: 0 8px 32px rgba(0,196,140,0.16), 0 0 0 1px rgba(0,196,140,0.1) !important; transform: translateY(-3px) !important; }
.hv2-module-toolkit:hover  { border-color: rgba(0,229,255,0.5) !important; box-shadow: 0 8px 32px rgba(0,229,255,0.14), 0 0 0 1px rgba(0,229,255,0.08) !important; transform: translateY(-3px) !important; }

/* Larger icon wrap */
.hvm-icon-wrap {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Icon backgrounds with stronger definition */
.hvm-icon-usecases { background: rgba(0,93,255,0.18) !important; border: 1px solid rgba(0,93,255,0.25) !important; }
.hvm-icon-prompts  { background: rgba(255,196,0,0.16) !important; border: 1px solid rgba(255,196,0,0.22) !important; }
.hvm-icon-excel    { background: rgba(0,196,140,0.18) !important; border: 1px solid rgba(0,196,140,0.25) !important; }
.hvm-icon-toolkit  { background: rgba(0,229,255,0.14) !important; border: 1px solid rgba(0,229,255,0.2) !important; }

.hvm-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 0 6px !important;
  line-height: 1.2 !important;
  position: relative;
  z-index: 1;
}

.hvm-desc {
  font-size: 11px !important;
  color: var(--text-secondary) !important;
  margin: 0 !important;
  line-height: 1.55 !important;
  position: relative;
  z-index: 1;
}

.hvm-footer {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin-top: auto !important;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
  letter-spacing: 0.2px;
}
.hv2-module-usecases:hover .hvm-footer { color: #6B9FFF !important; }
.hv2-module-prompts:hover .hvm-footer  { color: var(--warning) !important; }
.hv2-module-excel:hover .hvm-footer    { color: #00C48C !important; }
.hv2-module-toolkit:hover .hvm-footer  { color: var(--cyan-500) !important; }

/* Active badge in top-right corner */
.hv2-module-card::after {
  content: 'LIVE';
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--success);
  background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-heading);
}

/* ─── Responsive: Hero split on small screens ─── */
@media (max-width: 900px) {
  .hv2-hero-body-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hv2-mission-widget {
    flex-direction: row;
    text-align: right;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
  }
  .hv2-mw-ring-wrap { width: 72px; height: 72px; }
  .hv2-mw-pct { font-size: 16px; }
  .hv2-mw-meta { align-items: flex-start; }
}

@media (max-width: 768px) {
  .hv2-modules-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .hv2-module-card { min-height: 140px !important; }
}

@media (max-width: 480px) {
  .hv2-hero-body-split { gap: 12px; }
  .hv2-mission-widget { padding: 10px; }
}


/* ════════════════════════════════════════════════════════════
   EMPLOYEE MASTER — Payroll Systems
   Reuses: existing color tokens, modal system, workspace patterns
   ════════════════════════════════════════════════════════════ */

/* ── Payroll Systems Hub - Relate Style ── */
.ps-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.ps-hub-card {
  background: #ffffff;
  border: 1px solid var(--stone-divider, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  text-align: right;
  direction: rtl;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-relate-card);
  display: flex;
  flex-direction: column;
}

.ps-hub-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-relate-card-hover);
}

.ps-hub-card.ps-card-active {
  border-color: var(--stone-divider, #e2e8f0);
}

.ps-hub-card.ps-card-coming-soon {
  opacity: 0.65;
  cursor: not-allowed;
  background: var(--fog-surface, #f8fafc);
}

.ps-hub-card.ps-card-coming-soon:hover {
  transform: none;
  box-shadow: var(--shadow-relate-card);
  border-color: var(--stone-divider, #e2e8f0);
}

.ps-card-icon {
  font-size: 24px;
  margin-bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--lavender-wash, #f0f4fe);
  display: grid;
  place-items: center;
}

.ps-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--midnight-ink, #020520);
  margin-bottom: 6px;
  font-family: var(--font-heading, 'Cairo', sans-serif);
}

.ps-card-desc {
  font-size: 12px;
  color: var(--ash-helper, #6b7280);
  line-height: 1.5;
  font-family: inherit;
  margin-bottom: 14px;
  flex: 1;
}

.ps-card-status {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  width: fit-content;
}

.ps-card-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.ps-status-live {
  background: #eefcf0;
  color: #15803d;
  border: 1px solid rgba(22, 202, 46, 0.2);
}

.ps-status-soon {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid var(--stone-divider, #e2e8f0);
}

/* ── Employee Master: Layout ── */
.em-layout { direction: rtl; font-family: var(--font-arabic); }

.em-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.em-header-info h1 { font-size: 22px; font-weight: 800; color: var(--text-primary); margin: 0 0 6px; }
.em-header-info p  { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Stats Row */
.em-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.em-stat-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
}
.em-stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-heading);
  line-height: 1;
}
.em-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-family: var(--font-arabic);
}
.em-stat-card.stat-active .em-stat-val   { color: var(--success); }
.em-stat-card.stat-probation .em-stat-val { color: var(--cyan-500); }
.em-stat-card.stat-notice .em-stat-val   { color: var(--warning); }
.em-stat-card.stat-archived .em-stat-val { color: var(--text-secondary); }

/* Search + Filter Bar */
.em-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.em-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.em-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
}
.em-search-input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-arabic);
  text-align: right;
  direction: rtl;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.em-search-input:focus {
  outline: none;
  border-color: rgba(0,229,255,0.35);
}
.em-filter-select {
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-arabic);
  cursor: pointer;
  min-width: 140px;
  direction: rtl;
  transition: border-color 0.2s;
}
.em-filter-select:focus { outline: none; border-color: rgba(0,229,255,0.3); }
.em-filter-select option { background: #111827; color: var(--text-primary); }

/* Table */
.em-table-wrap {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}
.em-table {
  width: 100%;
  border-collapse: collapse;
  direction: rtl;
  font-family: var(--font-arabic);
  font-size: 13px;
}
.em-table thead {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.em-table th {
  padding: 13px 14px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.em-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
  vertical-align: middle;
}
.em-table tbody tr:last-child td { border-bottom: none; }
.em-table tbody tr:hover td { background: rgba(255,255,255,0.025); }
.em-table tbody tr.em-row-archived td { opacity: 0.45; }

.em-emp-name { font-weight: 600; }
.em-emp-id   { font-size: 11px; color: var(--text-secondary); font-family: var(--font-heading); }

/* Status badge */
.em-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-arabic);
  white-space: nowrap;
}
.em-status-active      { background: rgba(46,204,113,0.1); color: var(--success); border: 1px solid rgba(46,204,113,0.2); }
.em-status-probation   { background: rgba(0,229,255,0.1); color: var(--cyan-500); border: 1px solid rgba(0,229,255,0.18); }
.em-status-notice      { background: rgba(255,196,0,0.1); color: var(--warning); border: 1px solid rgba(255,196,0,0.2); }
.em-status-suspended   { background: rgba(255,107,53,0.1); color: #ff6b35; border: 1px solid rgba(255,107,53,0.2); }
.em-status-resigned    { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.1); }
.em-status-terminated  { background: rgba(231,76,60,0.1); color: var(--danger); border: 1px solid rgba(231,76,60,0.2); }
.em-status-archived    { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.06); }

/* Action buttons */
.em-actions-cell { display: flex; gap: 6px; white-space: nowrap; }
.em-action-btn {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-arabic);
  white-space: nowrap;
}
.em-action-btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.18); }
.em-action-btn.em-btn-edit  { border-color: rgba(0,229,255,0.2); }
.em-action-btn.em-btn-edit:hover { background: rgba(0,229,255,0.08); color: var(--cyan-500); }
.em-action-btn.em-btn-archive { border-color: rgba(255,196,0,0.2); }
.em-action-btn.em-btn-archive:hover { background: rgba(255,196,0,0.08); color: var(--warning); }

/* Empty state */
.em-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.em-empty-icon { font-size: 40px; margin-bottom: 12px; }
.em-empty h4 { font-size: 15px; color: var(--text-primary); margin: 0 0 8px; }
.em-empty p  { font-size: 13px; margin: 0; }

/* Add button */
.em-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(0,93,255,0.85), rgba(0,229,255,0.7));
  color: var(--text-primary);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-arabic);
  transition: all 0.2s;
  white-space: nowrap;
}
.em-add-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,93,255,0.3); }

/* ── Employee Modal Form ── */
.em-modal {
  direction: rtl;
  font-family: var(--font-arabic);
  padding: 0;
}
.em-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.em-modal-icon { font-size: 24px; }
.em-modal-title { font-size: 17px; font-weight: 800; color: var(--text-primary); margin: 0; }
.em-modal-subtitle { font-size: 12px; color: var(--text-secondary); margin: 3px 0 0; }

.em-modal-body { padding: 20px 24px; max-height: 62vh; overflow-y: auto; }

.em-form-section {
  margin-bottom: 24px;
}
.em-form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyan-500);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,229,255,0.15);
  font-family: var(--font-heading);
}
.em-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.em-form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.em-form-group { display: flex; flex-direction: column; gap: 6px; }
.em-form-group.em-full-width { grid-column: 1 / -1; }

.em-form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}
.em-form-label .em-req { color: var(--danger); }

.em-form-input, .em-form-select {
  padding: 9px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-arabic);
  direction: rtl;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.em-form-input:focus, .em-form-select:focus {
  outline: none;
  border-color: rgba(0,229,255,0.35);
}
.em-form-select option { background: #111827; }

.em-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.em-btn-save {
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(0,93,255,0.9), rgba(0,163,255,0.8));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-arabic);
  transition: all 0.2s;
}
.em-btn-save:hover { box-shadow: 0 4px 16px rgba(0,93,255,0.35); }
.em-btn-cancel {
  padding: 10px 20px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-arabic);
  transition: all 0.2s;
}
.em-btn-cancel:hover { background: rgba(255,255,255,0.09); color: var(--text-primary); }

/* ── Inline toast notification ── */
.em-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(15,20,35,0.96);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 13px;
  font-family: var(--font-arabic);
  color: var(--text-primary);
  z-index: 99999;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  white-space: nowrap;
  pointer-events: none;
}
.em-toast.em-toast-show { transform: translateX(-50%) translateY(0); }
.em-toast.em-toast-error { border-color: rgba(231,76,60,0.3); }
.em-toast.em-toast-success { border-color: rgba(46,204,113,0.3); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .em-stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .em-stats-row { grid-template-columns: repeat(2, 1fr); }
  .em-form-grid  { grid-template-columns: 1fr; }
  .em-form-grid-3 { grid-template-columns: 1fr; }
  .em-controls { flex-direction: column; }
  .em-table { font-size: 11px; }
  .em-table th, .em-table td { padding: 10px 8px; }
  .ps-hub-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .ps-hub-grid { grid-template-columns: 1fr; }
  .em-stats-row { grid-template-columns: 1fr 1fr; }
}

/* ── Employee Profile System ── */
.ep-layout {
  direction: rtl;
  font-family: var(--font-arabic);
}
.ep-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.ep-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}
.ep-profile-info {
  display: flex;
  align-items: center;
  gap: 18px;
}
.ep-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 93, 255, 0.8), rgba(0, 229, 255, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.25);
}
.ep-profile-meta h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.ep-profile-subtitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.ep-profile-subtitle span.sep {
  opacity: 0.3;
}
.ep-completeness-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.15);
  padding: 8px 14px;
  border-radius: 12px;
}
.ep-completeness-info {
  text-align: left;
}
.ep-completeness-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  text-align: right;
}
.ep-completeness-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan-500);
  font-family: var(--font-heading);
}
.ep-completeness-bar-bg {
  width: 80px;
  height: 6px;
  background: var(--border-strong);
  border-radius: 3px;
  overflow: hidden;
}
.ep-completeness-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan-500));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.ep-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.ep-actions-right {
  display: flex;
  gap: 8px;
}
.ep-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ep-btn-back:hover {
  background: var(--surface-active);
  color: var(--text-primary);
}
.ep-tabs-nav {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ep-tabs-nav::-webkit-scrollbar {
  display: none;
}
.ep-tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ep-tab-btn:hover {
  color: var(--text-primary);
  background: var(--surface);
}
.ep-tab-btn.active {
  color: var(--text-primary);
  background: var(--glow-sm);
  border: 1px solid var(--glow-md);
  box-shadow: 0 4px 12px var(--accent-soft);
}
.ep-tab-panel {
  display: none;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.ep-tab-panel.active {
  display: block;
}
.ep-tab-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.ep-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.ep-field-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--surface-hover);
  border-radius: 10px;
  padding: 12px 16px;
}
.ep-field-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}
.ep-field-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}
.ep-field-value.english-val {
  font-family: var(--font-heading);
  direction: ltr;
  text-align: right;
}
.ep-edit-note {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .ep-field-grid {
    grid-template-columns: 1fr;
  }
  .ep-header-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Employee Bulk Import System ── */
.em-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-arabic);
  transition: all 0.2s;
  white-space: nowrap;
}
.em-btn-secondary:hover {
  background: var(--border);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.em-import-dropzone {
  border: 2px dashed rgba(0, 93, 255, 0.3);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  background: rgba(0, 93, 255, 0.02);
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.em-import-dropzone:hover, .em-import-dropzone.dragover {
  border-color: var(--cyan-500);
  background: rgba(0, 229, 255, 0.04);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}
.em-import-dropzone .dropzone-icon {
  font-size: 40px;
  margin-bottom: 4px;
}
.em-import-dropzone .dropzone-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}
.em-import-dropzone .dropzone-subtext {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.em-import-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.em-import-stat-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  transition: all 0.2s;
}
.em-import-stat-card.stat-valid { border-color: rgba(46, 204, 113, 0.3); background: rgba(46, 204, 113, 0.02); }
.em-import-stat-card.stat-invalid { border-color: rgba(231, 76, 60, 0.3); background: rgba(231, 76, 60, 0.02); }
.em-import-stat-card.stat-warnings { border-color: rgba(241, 196, 15, 0.3); background: rgba(241, 196, 15, 0.02); }
.em-import-stat-card.stat-errors { border-color: rgba(231, 76, 60, 0.5); background: rgba(231, 76, 60, 0.05); }

.em-import-stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.em-import-stat-card.stat-valid .em-import-stat-val { color: var(--success); }
.em-import-stat-card.stat-invalid .em-import-stat-val { color: var(--danger); }
.em-import-stat-card.stat-warnings .em-import-stat-val { color: var(--warning); }
.em-import-stat-card.stat-errors .em-import-stat-val { color: var(--danger); }

.em-import-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
}

.em-import-log-section {
  background: rgba(2, 4, 16, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  max-height: 180px;
  overflow-y: auto;
}
.em-import-log-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-500);
  margin: 0 0 10px;
}
.em-import-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.em-import-log-item {
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.em-import-log-item.log-error { color: var(--danger); }
.em-import-log-item.log-warning { color: var(--warning); }

.em-import-preview-container {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 24px;
  background: rgba(2, 4, 16, 0.2);
  max-height: 250px;
}
.em-import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: right;
}
.em-import-preview-table th, .em-import-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.em-import-preview-table th {
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
.em-import-preview-table tr:hover td {
  background: rgba(0, 93, 255, 0.05);
}

.readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.readiness-badge.ready { background: rgba(46, 204, 113, 0.12); color: var(--success); border: 1px solid rgba(46, 204, 113, 0.2); }
.readiness-badge.missing-bank { background: rgba(241, 196, 15, 0.1); color: var(--warning); border: 1px solid rgba(241, 196, 15, 0.2); }
.readiness-badge.missing-insurance { background: rgba(155, 89, 182, 0.12); color: #9b59b6; border: 1px solid rgba(155, 89, 182, 0.2); }
.readiness-badge.missing-docs { background: rgba(231, 76, 60, 0.1); color: var(--danger); border: 1px solid rgba(231, 76, 60, 0.2); }

.em-import-option-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.em-import-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.em-import-option-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.em-import-select {
  padding: 6px 12px;
  background: #090e20;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  font-family: var(--font-arabic);
}
.em-import-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.em-import-checkbox-wrap input {
  cursor: pointer;
}

/* ============================================================
   MONTHLY PAYROLL REGISTER (PAYRUNS) STYLES
   ============================================================ */

.pr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.pr-kpi-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.pr-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08);
}

.pr-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(0, 93, 255, 0.2);
}

.pr-kpi-card.kpi-net .pr-kpi-icon {
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan-500);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.pr-kpi-card.kpi-add .pr-kpi-icon {
  background: rgba(46, 204, 113, 0.1);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.pr-kpi-card.kpi-ded .pr-kpi-icon {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.pr-kpi-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pr-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.pr-kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
}

/* Payrun Status Badges */
.pr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-arabic);
}

.pr-badge-draft {
  background: rgba(241, 196, 15, 0.12);
  color: var(--warning);
  border: 1px solid rgba(241, 196, 15, 0.2);
}

.pr-badge-approved {
  background: var(--accent-soft);
  color: #3b82f6;
  border: 1px solid rgba(0, 93, 255, 0.2);
}

.pr-badge-locked {
  background: rgba(46, 204, 113, 0.12);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

/* Payslip Styles */
.payslip-modal-body {
  padding: 24px;
  background: #0d122e;
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  border: 1px dashed var(--border-strong);
}

.payslip-header {
  border-bottom: 2px dashed var(--border-strong);
  padding-bottom: 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.payslip-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan-500);
  margin: 0;
}

.payslip-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

.payslip-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: var(--surface);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.payslip-meta-item {
  font-size: 12px;
}

.payslip-meta-item strong {
  color: var(--text-secondary);
  font-weight: normal;
  margin-left: 6px;
}

.payslip-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.payslip-col-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
}

.payslip-col-title {
  background: var(--surface);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.payslip-col-title.earnings {
  border-right: 3px solid var(--success);
}

.payslip-col-title.deductions {
  border-right: 3px solid var(--danger);
}

.payslip-item-list {
  padding: 8px 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payslip-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.payslip-item-row .val {
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.payslip-footer-net {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.payslip-footer-net .label {
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan-500);
}

.payslip-footer-net .val {
  font-size: 20px;
  font-weight: 800;
  color: var(--cyan-500);
  font-family: var(--font-heading);
}

/* Adjustments Dialog Grid */
.adj-section-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.adj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.adj-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
}

.adj-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.adj-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.adj-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.adj-item-text {
  font-size: 12px;
  color: var(--text-primary);
}

.adj-item-val {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--text-primary);
  margin-right: auto;
  margin-left: 12px;
}

.em-btn-icon-danger {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
}

.em-btn-icon-danger:hover {
  color: #c0392b;
}

/* Print CSS */
@media print {
  body * {
    visibility: hidden;
  }
  .payslip-modal-body, .payslip-modal-body * {
    visibility: visible;
  }
  .payslip-modal-body {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none !important;
    background: white !important;
    color: black !important;
  }
  .payslip-modal-body * {
    color: black !important;
  }
  .payslip-title, .payslip-footer-net .label, .payslip-footer-net .val {
    color: black !important;
  }
  .payslip-meta-grid, .payslip-col-section, .payslip-footer-net {
    background: transparent !important;
    border: 1px solid #000 !important;
  }
  .payslip-header, .payslip-col-title {
    border-bottom: 1px solid #000 !important;
    background: transparent !important;
  }
}

/* Table responsive wrapper for expanded columns */
.em-table-responsive-wrapper {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 20px;
}

