/* assets/css/pages/home.css */

.home-page > * + * {
  margin-top: var(--space-3);
}

#homeReactRoot:empty,
#homeSmartRoot:empty,
#homeAttentionRoot:empty {
  display: none;
}

#homePhpFallback[hidden],
#homeSmartFallback[hidden],
#homeAttentionFallback[hidden] {
  display: none !important;
}

.home-summary-strip {
  position: relative;
  display: grid;
  gap: var(--space-2);
  padding: 12px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  overflow: hidden;
}

.home-summary-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.18));
  opacity: 0.58;
}

.home-summary-strip > * {
  position: relative;
  z-index: 1;
}

.home-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.home-strip-title {
  font-size: var(--fs-2);
  font-weight: var(--fw-bold);
  color: var(--text-main);
}

.home-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.64);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
}

.home-live__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(46, 157, 91, 0.14);
  animation: homeLivePulse 3.2s ease-in-out infinite;
}

.home-strip-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-kpi {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-kpi__label {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.home-kpi__value {
  color: var(--text-main);
  font-size: var(--fs-4);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.home-page .home-smart {
  border-radius: var(--radius-xl);
  border-color: var(--border-soft);
  background:
    linear-gradient(180deg, rgba(229, 170, 23, 0.08), rgba(229, 170, 23, 0.03)),
    var(--surface-1);
  box-shadow: var(--shadow-2);
}

.home-smart__body {
  margin-top: var(--space-3);
}

.home-smart__title {
  font-size: var(--fs-3);
  font-weight: var(--fw-bold);
  color: var(--text-main);
}

.home-smart__desc {
  margin-top: var(--space-1);
  font-size: var(--fs-2);
  line-height: 1.6;
  color: var(--text-muted);
}

.home-smart__actions {
  margin-top: var(--space-3);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.home-smart__actions .btn {
  width: 100%;
  height: var(--control-h-sm);
}

.home-smart__actions--single {
  grid-template-columns: 1fr;
}

.home-card-title {
  margin: 0;
  font-size: var(--fs-3);
  font-weight: var(--fw-bold);
  color: var(--text-main);
}

.home-card-sub {
  margin-top: var(--space-1);
  font-size: var(--fs-2);
  line-height: 1.6;
  color: var(--text-muted);
}

.home-attention {
  border-radius: var(--radius-xl);
  border-color: var(--border-soft);
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
}

.home-attention__list {
  margin-top: var(--space-3);
  display: grid;
  gap: var(--space-2);
}

.home-attention__item {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.home-attention__item:hover {
  border-color: rgba(229, 170, 23, 0.36);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.home-attention__item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.home-attention__item.is-alert {
  border-color: rgba(229, 170, 23, 0.32);
  background: rgba(229, 170, 23, 0.08);
}

.home-attention__item.is-disabled {
  cursor: default;
  pointer-events: none;
}

.home-attention__item.is-disabled:hover {
  border-color: var(--border-soft);
  box-shadow: none;
  transform: none;
}

.home-attention__item.is-disabled:focus,
.home-attention__item.is-disabled:focus-visible {
  outline: none;
  box-shadow: none;
}

.home-attention__meta {
  min-width: 0;
}

.home-attention__title {
  font-size: var(--fs-2);
  font-weight: var(--fw-bold);
  color: var(--text-main);
}

.home-attention__status {
  margin-top: 2px;
  font-size: var(--fs-1);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-attention__side {
  text-align: left;
  white-space: nowrap;
  flex-shrink: 0;
}

.home-attention__count {
  font-size: var(--fs-4);
  font-weight: var(--fw-bold);
  color: var(--text-main);
  line-height: 1;
}

.home-attention__action {
  margin-top: 3px;
  font-size: var(--fs-1);
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .home-attention__item {
    padding: 9px 10px;
  }

  .home-attention__status {
    max-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-live__dot {
    animation: none;
  }

  .home-attention__item {
    transition: none;
  }
}

@keyframes homeLivePulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.62;
  }

  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}
