/* ============================================================
   WHALE OS 2.0 — Bento Command Center Stylesheet
   Relate Visual Language • Snow Canvas & Slate-950 Dual Theme
   Data-Dense • High Contrast • Native Arabic RTL
   ============================================================ */

.hd-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════
   1. EXECUTIVE TOP STRIP
   ══════════════════════════════════════════════════════════ */
.hd-exec-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}

.hd-exec-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hd-exec-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(20, 90, 255, 0.15);
  flex-shrink: 0;
}

.hd-exec-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hd-exec-greeting {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.hd-exec-greeting strong {
  color: var(--accent);
}

.hd-exec-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hd-exec-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   2. BENTO TILES INTERNALS
   ══════════════════════════════════════════════════════════ */
.bento-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.bento-tile-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--accent-wash);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.bento-tile-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: inherit;
}

/* Hero Tile Pulse Items */
.bento-hero-tile {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-fog) 100%) !important;
}

.bento-pulse-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.bento-pulse-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.bento-pulse-item:hover {
  border-color: var(--border-strong);
  transform: translateX(-2px);
  box-shadow: var(--shadow-sm);
}

.bento-pulse-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.pulse-blue {
  background: rgba(20, 90, 255, 0.12);
  color: var(--accent);
}

.pulse-green {
  background: rgba(22, 202, 46, 0.12);
  color: var(--success);
}

.pulse-amber {
  background: rgba(255, 166, 77, 0.15);
  color: var(--warning);
}

.bento-pulse-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bento-pulse-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.bento-pulse-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.bento-pulse-sub strong {
  color: var(--text-primary);
}

.bento-tile-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bento-footer-note {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Headcount Large Metric & Segmented Bar */
.bento-metric-large {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.bento-metric-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-metrics, 'Inter', sans-serif);
}

.bento-metric-subtext {
  font-size: 12.5px;
  color: var(--text-muted);
}

.bento-ratio-bar {
  display: flex;
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 12px;
  background-color: var(--border);
}

.bento-ratio-segment {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.bento-ratio-legends {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.bento-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bento-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* Stat Highlight (1x1 Tiles) */
.bento-stat-highlight {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.bento-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.bento-stat-desc {
  font-size: 12px;
  color: var(--text-muted);
}

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

/* AI Copilot Fast Launcher */
.bento-ai-tile {
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-wash) 100%) !important;
  border-color: rgba(20, 90, 255, 0.2) !important;
}

.bento-ai-desc {
  margin: 0 0 10px 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.bento-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-ai-chips .chip {
  background-color: var(--surface);
  box-shadow: 0 1px 2px rgba(2, 5, 32, 0.04);
}

/* Recent Activity List */
.bento-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.bento-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background-color: var(--bg-fog);
  border-radius: 8px;
  font-size: 12.5px;
}

.bento-activity-icon {
  font-size: 14px;
}

.bento-activity-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.bento-activity-name {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bento-activity-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-inline-start: 8px;
}

/* ══════════════════════════════════════════════════════════
   3. KNOWLEDGE & ANALYTICAL SUITES (BOTTOM TIER)
   ══════════════════════════════════════════════════════════ */
.hd-suites-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hd-suites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hd-suites-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hd-suites-title i {
  color: var(--accent);
}

.hd-suites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hd-suite-card:not(.card-visual) {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.18s ease;
}

.hd-suite-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.hd-suite-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hd-suite-icon {
  font-size: 18px;
  color: var(--accent);
}

.hd-suite-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.hd-suite-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

.hd-suite-footer {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.hd-suite-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════
   4. RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .hd-suites-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hd-main {
    padding: 14px 14px 40px;
    gap: 16px;
  }
  .hd-exec-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .hd-exec-actions {
    justify-content: flex-start;
  }
  .hd-suites-grid {
    grid-template-columns: 1fr;
  }
}
