/**
 * FOUNDER EDITION — Intelligence-Driven SaaS
 * Stripe / Linear tier. 89€/month+ feel.
 * NO backend changes. Visual + layout only.
 */

/* ============================================
   PHASE 1 — OPERATIONAL BAR
   ============================================ */
.fe-op-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-2, 16px);
  margin-bottom: var(--ds-space-4, 32px);
}

.fe-op-card {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-2, 16px);
  padding: var(--ds-space-2, 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.fe-op-card:hover {
  box-shadow: var(--shadow-2);
}

.fe-op-card.fe-op-green { border-left: 4px solid var(--success); }
.fe-op-card.fe-op-amber { border-left: 4px solid var(--warning); }
.fe-op-card.fe-op-red { border-left: 4px solid var(--danger); }
.fe-op-card.fe-op-blue { border-left: 4px solid var(--primary); }

.fe-op-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 18px;
  flex-shrink: 0;
}

.fe-op-green .fe-op-icon { background: var(--success-soft); color: var(--success); }
.fe-op-amber .fe-op-icon { background: var(--warning-soft); color: var(--warning); }
.fe-op-red .fe-op-icon { background: var(--danger-soft); color: var(--danger); }
.fe-op-blue .fe-op-icon { background: var(--primary-soft); color: var(--primary); }

.fe-op-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.fe-op-label {
  font-size: var(--ds-caption);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.fe-op-desc {
  font-size: 12px;
  color: var(--text-soft);
}

/* ============================================
   PHASE 1 — 2-COLUMN DASHBOARD GRID
   ============================================ */
.fe-dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--ds-space-4, 32px);
  align-items: start;
}

@media (max-width: 1024px) {
  .fe-dashboard-grid { grid-template-columns: 1fr; }
  .fe-op-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .fe-op-bar { grid-template-columns: 1fr; }
}

/* ============================================
   PHASE 1 — RECENT ACTIVITY
   ============================================ */
.fe-activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fe-activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.fe-activity-item:last-child { border-bottom: none; }

.fe-activity-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.fe-activity-text { font-size: var(--ds-body); font-weight: 500; }
.fe-activity-time { font-size: var(--ds-caption); color: var(--text-soft); margin-top: 2px; }

.fe-activity-empty {
  padding: var(--ds-space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--ds-body);
}

/* ============================================
   PHASE 2 — FLOATING QUICK ACTION
   ============================================ */
.fe-floating-action {
  position: fixed;
  bottom: var(--ds-space-4, 32px);
  right: var(--ds-space-4, 32px);
  z-index: 900;
}

.fe-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.fe-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.fe-fab:active { transform: scale(0.98); }

.fe-fab-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  padding: var(--ds-space-1);
}

.fe-fab-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-3);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: var(--ds-body);
  transition: background 180ms ease;
}

.fe-fab-dropdown a:hover {
  background: var(--surface-2);
}

/* Hide FAB on mobile when sidebar might overlap */
@media (max-width: 768px) {
  .fe-floating-action { bottom: 20px; right: 20px; }
  .fe-fab { width: 48px; height: 48px; font-size: 20px; }
}

/* ============================================
   PHASE 2 — PRIMARY CTA AUTHORITY
   ============================================ */
.btn-primary {
  font-weight: 600 !important;
  padding: var(--ds-space-2, 16px) var(--ds-space-4, 32px) !important;
  font-size: 15px !important;
}

.btn-primary.btn-sm {
  padding: var(--ds-space-1, 8px) var(--ds-space-2, 16px) !important;
  font-size: var(--ds-body) !important;
}

/* ============================================
   PHASE 3 — MAX WIDTH
   ============================================ */
.dashboard-shell,
.audit-shell,
.fe-content-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
}

/* ============================================
   PHASE 4 — TABLE PROFESSIONALIZATION
   ============================================ */
.table thead {
  background: #eef1f5 !important;
}

.table th {
  padding: var(--ds-space-2) var(--ds-space-2) !important;
  font-weight: 600 !important;
}

.table td {
  padding: var(--ds-space-2) var(--ds-space-2) !important;
}

.table tbody tr {
  transition: background 180ms ease;
}

/* 3-dot action button - 36px to match row action height */
.fe-actions-dot {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 180ms ease;
}

.fe-actions-dot:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

/* ============================================
   PHASE 6 — WORK DETAIL MODULAR CARDS
   ============================================ */
.fe-work-card {
  margin-bottom: var(--ds-space-3);
}

.fe-work-card .card-xl {
  margin-bottom: 0;
}

.fe-section-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--ds-space-3) 0;
}

.fe-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.fe-actions-group.fe-primary { margin-bottom: var(--ds-space-2); }
.fe-actions-group.fe-destructive { padding-top: var(--ds-space-2); border-top: 1px solid var(--border-subtle); }

/* ============================================
   PHASE 7 — VISUAL AUTHORITY
   ============================================ */
.page-title { font-weight: 700 !important; }
.section-title { font-weight: 600 !important; }

/* ============================================
   PHASE 8 — MICRO-PERFORMANCE
   ============================================ */
.card-xl,
.ds-card {
  transition: box-shadow 180ms ease, transform 180ms ease !important;
}

.dropdown-menu {
  transition: opacity 180ms ease, transform 180ms ease !important;
}
