/**
 * Automation Page Specific Styles
 * ROI calculator, dashboards, activity feed
 */

/* ===== Page-specific overrides ===== */
body {
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(21, 101, 192, 0.08) 100%);
}

html[data-theme="dark"] body {
  background: linear-gradient(135deg, rgba(11, 15, 20, 0.95) 0%, rgba(15, 21, 32, 0.98) 100%);
}

main .container {
  max-width: 1100px;
}

/* ===== Page Hero ===== */
header.page-hero {
  background: var(--color-primary);
  color: var(--text-white);
  padding: 20px;
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-lg);
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

header.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

header.page-hero h1 {
  font-size: 2em;
  margin-bottom: 6px;
}

/* ===== Custom Buttons ===== */
.btnx {
  background: var(--color-primary-light);
  color: var(--text-white);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.btnx.alt {
  background: var(--color-accent);
  color: #333;
}

.btnx.ghost {
  background: var(--bg-card);
  color: var(--color-primary);
  border: 1px solid var(--border-light);
}

.cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ===== Dashboard Cards ===== */
.dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.cardx {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.cardx h3 {
  font-size: 1em;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0;
}

.stat {
  font-size: 1.8em;
  color: var(--color-primary-light);
  margin-top: 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.desc {
  font-size: 0.92em;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ===== Controls Panel ===== */
.controls {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin: 20px 0;
}

.ctrl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.ctrl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctrl label {
  font-size: 0.9em;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.val {
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

/* ===== Panels ===== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px;
}

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-pill, 999px);
  font-size: 0.78em;
  border: 1px solid var(--border-light);
  background: var(--color-primary-alpha-12);
  color: var(--color-primary);
}

.small {
  font-size: 0.85em;
  color: var(--text-secondary);
}

.subhead {
  margin: 0.5rem 0 0.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Charts & Visualization ===== */
.spark {
  width: 100%;
  height: 120px;
}

.legend {
  font-size: 0.85em;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ===== Activity Feed ===== */
.activity-float {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 340px;
  max-width: 90vw;
  z-index: 10;
  pointer-events: none;
}

.lane {
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg, 12px);
  background: var(--bg-elevated);
  padding: 10px;
  box-shadow: var(--shadow-lg);
}

.lane-title {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.lane-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 48vh;
  overflow: hidden;
}

.row-ev {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  animation: evLife 9s ease-out forwards;
}

.badge {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary-alpha-12);
  color: var(--color-primary);
  font-size: 16px;
}

.row-ev .meta {
  font-size: 0.86em;
  color: var(--text-secondary);
  margin-left: auto;
}

@keyframes evLife {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  82% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}
