/**
 * PROMPT 207 — Enterprise Modules Premium UX (presentation only)
 * Uses V3 tokens when present; enterprise SaaS density — not playful.
 */
:root {
  --emp-green: #059669;
  --emp-amber: #d97706;
  --emp-red: #dc2626;
  --emp-blue: #2563eb;
  --emp-purple: #7c3aed;
  --emp-radius: 18px;
  --emp-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  --emp-shadow-lg: 0 14px 32px rgba(15, 23, 42, 0.1);
}

body.emp207 .emp207-shell {
  margin-bottom: 16px;
}

.emp207-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
  box-shadow: var(--emp-shadow);
  margin-bottom: 14px;
}
.emp207-hero--ai {
  background: linear-gradient(135deg, #faf5ff 0%, #eef2ff 50%, #ffffff 100%);
  border-color: #ddd6fe;
}
.emp207-hero--info {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ffffff 100%);
}
.emp207-hero__main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 240px;
}
.emp207-hero__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--emp-shadow);
  flex-shrink: 0;
}
.emp207-hero__title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.emp207-hero__sub {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 38rem;
}
.emp207-hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.emp207-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}
.emp207-chip--ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.emp207-chip--ai {
  background: #f5f3ff;
  color: #5b21b6;
  border-color: #ddd6fe;
}
.emp207-chip--info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.emp207-chip--warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.emp207-updated {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
}

.emp207-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 900px) {
  .emp207-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.emp207-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--emp-radius);
  padding: 14px;
  min-height: 108px;
  box-shadow: var(--emp-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.emp207-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--emp-shadow-lg);
}
.emp207-kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}
.emp207-kpi--ok::before {
  background: var(--emp-green);
}
.emp207-kpi--ai::before {
  background: var(--emp-purple);
}
.emp207-kpi--info::before {
  background: var(--emp-blue);
}
.emp207-kpi--warn::before {
  background: var(--emp-amber);
}
.emp207-kpi--bad::before {
  background: var(--emp-red);
}
.emp207-kpi__ico {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.emp207-kpi__lbl {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
}
.emp207-kpi__val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.emp207-kpi__en {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 600;
}

.emp207-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 700px) {
  .emp207-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .emp207-products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.emp207-pcard {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--emp-radius);
  padding: 16px;
  box-shadow: var(--emp-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.emp207-pcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--emp-shadow-lg);
}
.emp207-pcard--premium {
  background: linear-gradient(160deg, #faf5ff 0%, #ffffff 55%);
  border-color: #ddd6fe;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
}
.emp207-pcard__top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.emp207-pcard__ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.emp207-pcard--premium .emp207-pcard__ico {
  background: linear-gradient(145deg, #ede9fe, #e0e7ff);
  border-color: #c4b5fd;
}
.emp207-pcard h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}
.emp207-pcard p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
}
.emp207-pcard__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.emp207-pcard__metrics > div {
  flex: 1 1 40%;
  min-width: 4.5rem;
  padding: 8px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  text-align: center;
}
.emp207-pcard__metrics b {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}
.emp207-pcard__metrics span {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}

.emp207-section-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin: 8px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.emp207-note {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.emp207-ucard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 700px) {
  .emp207-ucard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .emp207-ucard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.emp207-ucard {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--emp-radius);
  padding: 14px 16px;
  box-shadow: var(--emp-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.emp207-ucard:hover {
  transform: translateY(-2px);
  box-shadow: var(--emp-shadow-lg);
  border-color: #c7d2fe;
}
.emp207-ucard__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.emp207-ucard__av {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ecfdf5, #e0f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.emp207-ucard h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}
.emp207-ucard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: #64748b;
}
.emp207-ucard__actions {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emp207-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  margin-right: auto;
}
.emp207-badge--ok {
  background: #dcfce7;
  color: #166534;
}

.emp207-role-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.emp207-role {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.emp207-role--super {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}
.emp207-role--org {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.emp207-role--center {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.emp207-role--stu {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.emp207-tech {
  font-size: 0.78rem;
  color: #64748b;
}
.emp207-tech summary {
  cursor: pointer;
  font-weight: 800;
  color: #475569;
}
.emp207-tech--block {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}
.emp207-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.emp207-empty {
  text-align: center;
  padding: 28px 14px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--emp-radius);
  color: #64748b;
}
.emp207-empty .ico {
  font-size: 2rem;
  margin-bottom: 8px;
}
.emp207-empty strong {
  display: block;
  color: #0f172a;
  margin-bottom: 6px;
}
.emp207-empty p {
  margin: 0 auto;
  max-width: 24rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.emp207-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--emp-radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--emp-shadow);
}
.emp207-chart-card h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 800;
}
.emp207-bars > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.emp207-bars > div > span {
  flex: 0 0 4.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}
.emp207-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  height: 12px;
  position: relative;
  overflow: visible;
}
.emp207-bar i {
  display: block;
  height: 12px;
  border-radius: 999px;
  min-width: 4px;
  transition: width 0.3s ease;
}
.emp207-bar b {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0f172a;
  position: absolute;
  left: 0;
  transform: translateX(calc(-100% - 8px));
  /* RTL: place count after bar */
  position: static;
  margin-right: 4px;
}

.emp207-inline-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff, #ecfdf5);
  border: 1px solid #c7d2fe;
  font-size: 0.82rem;
  color: #334155;
}
.emp207-inline-banner strong {
  color: #312e81;
  font-weight: 800;
}

.emp207-lift {
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.emp207-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--emp-shadow-lg);
}

/* AI provider grid soft polish */
.emp207-ai-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .emp207-ai-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.emp207-ai-card,
#aipProvidersWrap > div {
  border-radius: 16px !important;
}

/* Org command metrics already in org-admin; shell cohesion */
.emp207-org .org-admin-header {
  margin-bottom: 8px;
}
.emp207-org .org-kpi-row {
  gap: 10px;
}

/* Reports stats already on page */
#tab-reports #rptStats .stat-card {
  border-radius: 16px !important;
  box-shadow: var(--emp-shadow);
}

/* Responsive */
@media (max-width: 820px) {
  .emp207-hero {
    padding: 14px;
  }
  .emp207-hero__side {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .emp207-kpis,
  .emp207-products,
  .emp207-ucard-grid {
    grid-template-columns: 1fr !important;
  }
  body.emp207 .content {
    overflow-x: hidden;
  }
}

/* Tablet 2-col */
@media (min-width: 700px) and (max-width: 1099px) {
  .emp207-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
