/* ============================================================
   CODEXPERIA — TECHNOLOGY, QUALITY & KPIS
   technology.css
   ============================================================ */

/* ============================================================
   TECHNOLOGY COMMAND CENTER
   ============================================================ */
.section-tech {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
  background: var(--color-bg-base);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.tech-card {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(56, 189, 248, 0.08);
}

.tech-card:hover::before {
  opacity: 1;
}

.tech-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.tech-card-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.tech-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ============================================================
   QUALITY CONTINUOUS LOOP SECTION
   ============================================================ */
.section-quality {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
  background: linear-gradient(180deg, var(--color-bg-base) 0%, rgba(7, 17, 31, 0.95) 50%, var(--color-bg-base) 100%);
  border-top: 1px solid var(--color-border-subtle);
}

.quality-loop-wrapper {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  position: relative;
}

.quality-step {
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  transition: all 0.3s ease;
}

.quality-step:hover {
  background: rgba(13, 30, 53, 0.8);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.12);
}

.quality-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: var(--weight-bold);
}

.quality-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

/* ============================================================
   KPI CATEGORIES SECTION (ABSTRACT TELEMETRY)
   ============================================================ */
.section-kpis {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
  background: var(--color-bg-base);
  border-top: 1px solid var(--color-border-subtle);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.kpi-category-card {
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.kpi-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0.6;
  transition: opacity 0.35s ease;
}

.kpi-category-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 25px rgba(56, 189, 248, 0.08);
}

.kpi-category-card:hover::before {
  opacity: 1;
}

.kpi-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.kpi-category-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.kpi-category-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.kpi-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.kpi-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.kpi-item:hover {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.18);
}

.kpi-item-name {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Telemetry Micro Gauge & Meter Bar */
.kpi-telemetry {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.kpi-meter-track {
  width: 72px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.kpi-meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), #38bdf8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  transition: width 0.6s var(--ease-out);
}

.kpi-meter-fill--success {
  background: linear-gradient(90deg, #34d399, #6ee7b7);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.kpi-meter-fill--warning {
  background: linear-gradient(90deg, #fbbf24, #fde68a);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.kpi-meter-fill--indigo {
  background: linear-gradient(90deg, #818cf8, #a5b4fc);
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.5);
}

/* Status Pill Tag */
.kpi-status-tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-bright);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  min-width: 68px;
  text-align: center;
}

.kpi-status-tag--opt {
  color: var(--color-success);
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
}

.kpi-status-tag--active {
  color: var(--color-primary-bright);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

@media (max-width: 1024px) {
  .quality-loop-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .quality-loop-wrapper {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-meter-track {
    width: 50px;
  }
}
