/* ==========================================================================
   DeviantStack - Interactive Automation Pipeline & Node Flow Visualizer
   ========================================================================== */

/* Section wrapper */
.section-automations {
  position: relative;
  padding: 5.5rem 0 6.5rem;
  background: #050b16;
  overflow: hidden;
  border-bottom: 1px solid rgba(80, 160, 255, 0.2);
  scroll-margin-top: 100px;
}

.automations-header {
  margin-bottom: 2.5rem;
}

.automations-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(224, 122, 63, 0.12);
  color: var(--accent-deep);
  border: 1px solid rgba(224, 122, 63, 0.3);
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.automations-badge .pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-deep);
  box-shadow: 0 0 0 0 rgba(224, 122, 63, 0.7);
  animation: beacon-pulse 2s infinite;
}

@keyframes beacon-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 122, 63, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(224, 122, 63, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 122, 63, 0); }
}

/* ==========================================================================
   Project Workflow Overview (Reference Image Architecture & Aesthetics)
   ========================================================================== */

.workflow-header-hero {
  position: relative;
  z-index: 3;
  margin-bottom: 2rem;
}

.workflow-hero-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.1rem, 3.8vw, 2.85rem);
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.title-highlight-o {
  color: #4dd0e1;
  text-shadow: 0 0 20px rgba(77, 208, 225, 0.85);
}

.workflow-hero-sub {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 600;
  color: #94a9c9 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.sub-arrow {
  color: #4dd0e1;
  font-weight: 800;
}

/* Conduit connecting Pipeline to Google Sheets Suite */
.pipeline-to-sheet-conduit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 2.2rem 0;
  position: relative;
}

.conduit-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(224, 122, 63, 0.3), transparent);
  position: relative;
  overflow: hidden;
}

.conduit-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: conduit-stream 2.2s infinite linear;
}

@keyframes conduit-stream {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.conduit-badge {
  background: var(--card);
  border: 1.5px solid var(--accent);
  box-shadow: 0 8px 24px rgba(224, 122, 63, 0.2);
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  animation: conduit-pulse 3s infinite ease-in-out;
}

@keyframes conduit-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(224, 122, 63, 0.15); }
  50% { box-shadow: 0 12px 30px rgba(224, 122, 63, 0.35); transform: translateY(-2px); }
}

.conduit-badge i {
  font-size: 1.1rem;
  animation: bounce-arrow 1.6s infinite ease-in-out;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}



/* ==========================================================================
   Main Visualizer Viewport: Futuristic Cyber Console
   ========================================================================== */

.workflow-viewport {
  position: relative;
  background: radial-gradient(ellipse at 50% 45%, #0d1e38 0%, #081224 60%, #030812 100%);
  border: 1.5px solid rgba(100, 181, 246, 0.28);
  border-radius: 28px;
  box-shadow: 
    0 24px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 2px rgba(255, 255, 255, 0.12),
    inset 0 0 60px rgba(10, 25, 50, 0.5);
  padding: 2.2rem 1.6rem;
  overflow: hidden;
  min-height: 690px;
}

/* Radial Glows */
.workflow-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.glow-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(77, 208, 225, 0.24) 0%, rgba(100, 181, 246, 0.12) 50%, transparent 72%);
  filter: blur(48px);
}

.glow-left {
  top: 55%;
  left: 8%;
  transform: translate(-50%, -50%);
  width: 460px;
  height: 620px;
  background: radial-gradient(circle, rgba(100, 181, 246, 0.24) 0%, rgba(77, 208, 225, 0.12) 40%, transparent 70%);
  filter: blur(48px);
}

.glow-right {
  top: 55%;
  right: -6%;
  transform: translate(-50%, -50%);
  width: 460px;
  height: 620px;
  background: radial-gradient(circle, rgba(129, 199, 132, 0.24) 0%, rgba(77, 208, 225, 0.12) 40%, transparent 70%);
  filter: blur(48px);
}

/* Canvas & SVG Overlay */
.workflow-canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.workflow-svg,
.workflow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   3-Column Stage Grid (Left Panel -> Center Hub -> Right Panel)
   ========================================================================== */

.workflow-stage-grid {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  min-height: 640px;
}

@media (max-width: 1199px) {
  .workflow-viewport {
    overflow-x: auto;
  }
  .workflow-stage-grid {
    min-width: 1020px;
  }
}

/* Left & Right Panels: Prominent Glassmorphic Cyber Cards */
.workflow-panel {
  background: rgba(10, 22, 44, 0.42);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2px solid rgba(80, 160, 255, 0.38);
  border-radius: 26px;
  padding: 1.35rem 1.15rem;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(30, 120, 240, 0.22),
    inset 0 0 25px rgba(30, 120, 240, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
}

.panel-left {
  flex: 0 0 280px;
  max-width: 280px;
  border-color: rgba(100, 181, 246, 0.48);
}

.panel-right {
  flex: 0 0 295px;
  max-width: 295px;
  border-color: rgba(77, 208, 225, 0.48);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.8rem;
  border-bottom: 1.5px solid rgba(100, 181, 246, 0.22);
}

.panel-header-icon {
  color: #64b5f6;
  font-size: 1.35rem;
  filter: drop-shadow(0 0 8px rgba(100, 181, 246, 0.9));
}

.panel-right .panel-header-icon {
  color: #81c784;
  filter: drop-shadow(0 0 8px rgba(129, 199, 132, 0.9));
}

.panel-title {
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  margin: 0;
  text-shadow: 0 0 14px rgba(100, 181, 246, 0.6);
}

/* Pills List */
.workflow-pills-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.workflow-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(18, 35, 68, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.2px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 0.45rem 0.75rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
  min-height: 44px;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.16);
}

.workflow-pill:hover,
.workflow-pill.active {
  background: rgba(30, 60, 115, 0.68);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(100, 181, 246, 0.4);
}

.panel-left .workflow-pill:hover {
  transform: translateX(6px);
}

.panel-right .workflow-pill:hover {
  transform: translateX(-6px);
}

.pill-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.98rem;
  flex-shrink: 0;
  box-shadow: 
    0 0 12px currentColor,
    0 2px 6px rgba(0, 0, 0, 0.5);
}

.pill-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.84rem;
  font-weight: 750;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pill-port {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 12px currentColor, 0 0 4px #ffffff;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.workflow-pill:hover .pill-port,
.workflow-pill.active .pill-port {
  transform: scale(1.4);
  box-shadow: 0 0 16px currentColor, 0 0 8px #ffffff;
}

.port-out {
  margin-left: auto;
}

.port-in {
  margin-right: 0.15rem;
}

.pill-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(129, 199, 132, 0.2);
  border: 1.2px solid rgba(129, 199, 132, 0.45);
  color: #81c784;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 0.35rem;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   Center Hub Column: Circular Console Reactor
   ========================================================================== */

.workflow-hub-col {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-width: 470px;
}

.workflow-hub-circle {
  width: 460px;
  height: 460px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(13, 30, 60, 0.55) 0%, rgba(7, 16, 32, 0.75) 65%, rgba(4, 9, 20, 0.85) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2.5px solid rgba(100, 181, 246, 0.5);
  box-shadow: 
    0 0 60px rgba(77, 208, 225, 0.3),
    inset 0 0 50px rgba(77, 208, 225, 0.15),
    0 24px 70px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Concentric HUD Rings */
.hub-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-outer-hud {
  inset: -14px;
  border: 2px dashed rgba(100, 181, 246, 0.35);
  animation: ring-spin-cw 110s linear infinite;
}

.ring-notches {
  inset: -26px;
  border: 1.5px dotted rgba(77, 208, 225, 0.28);
  animation: ring-spin-ccw 145s linear infinite;
}

.ring-inner-glow {
  inset: 4px;
  border: 1px solid rgba(100, 181, 246, 0.18);
  box-shadow: inset 0 0 25px rgba(77, 208, 225, 0.15);
}

/* Hub Face Interior */
.hub-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

/* Hub Header / Avatar */
.hub-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.hub-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(239, 154, 143, 0.35);
  padding: 4px;
  overflow: hidden;
}

.hub-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform .3s ease;
}

.workflow-hub-circle:hover .hub-brand-img {
  transform: scale(1.08) rotate(-2deg);
}

.hub-title {
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: none !important;
}

.hub-subtitle {
  font-size: 0.7rem;
  color: #8da2c0;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Hub Capability Tiles (4 cols x 2 rows = 8 tiles) */
.hub-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 380px;
}

.hub-tile {
  background: rgba(14, 26, 48, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.5rem 0.35rem 0.45rem;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  box-shadow: none !important;
}

.hub-tile:hover,
.hub-tile.active-pulse {
  transform: translateY(-2px) scale(1.04);
  background: rgba(22, 42, 76, 0.85);
  border-color: var(--tc);
  box-shadow: none !important;
}

.tile-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--tc);
  color: #070d18;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  filter: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  margin-bottom: 0.15rem;
}

.tile-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.61rem;
  font-weight: 700;
  color: #e0ecff;
  line-height: 1.15;
  max-width: 82px;
}

/* Hub Footer: Spinning Gear & Arched Caption */
.hub-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.hub-gear-spin {
  color: #64b5f6;
  font-size: 1.25rem;
  line-height: 1;
  animation: gear-spin 38s linear infinite;
  filter: none !important;
  box-shadow: none !important;
}

.hub-arc-caption {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #7a9bc6;
  text-transform: uppercase;
}

/* Keyframe Animations */
@keyframes ring-spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ring-spin-ccw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes gear-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   SVG Ribbons & High-Performance Canvas Particles
   ========================================================================== */

.ribbon-halo {
  fill: none;
  stroke-linecap: round;
  opacity: 0.22;
  filter: blur(3px);
  transition: stroke-width 0.25s ease, opacity 0.25s ease;
}

.ribbon-tube {
  fill: none;
  stroke-linecap: round;
  stroke-width: 5.5px;
  opacity: 0.85;
  transition: stroke-width 0.25s ease, opacity 0.25s ease;
}

.ribbon-core {
  fill: none;
  stroke-linecap: round;
  stroke-width: 1.8px;
  stroke: #ffffff;
  opacity: 0.7;
  pointer-events: none;
}

.ribbon-group.active .ribbon-halo {
  opacity: 0.75;
  stroke-width: 18px;
  filter: blur(5px);
}

.ribbon-group.active .ribbon-tube {
  opacity: 1;
  stroke-width: 8px;
  filter: drop-shadow(0 0 10px currentColor);
}

.ribbon-group.active .ribbon-core {
  opacity: 0.95;
  stroke-width: 2.5px;
}

/* ==========================================================================
   KPI Highlights Below Pipeline
   ========================================================================== */
.automations-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 991px) {
  .automations-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .automations-kpi-row {
    grid-template-columns: 1fr;
  }
}

.automation-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.automation-kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #ffffff;
  background: var(--accent-deep);
}

.automation-kpi-card h3 {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.automation-kpi-card p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   Interactive Node Inspector Modal / Drawer
   ========================================================================== */
.node-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 22, 23, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.node-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.node-modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 2.2rem;
  position: relative;
}

.node-modal-backdrop.active .node-modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: none;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: #e2d6c6;
  transform: rotate(90deg);
}

.modal-header-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.modal-icon-large {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.modal-title-wrap h3 {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0 0 0.25rem 0;
  color: var(--ink);
}

.modal-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-badge-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(47, 143, 131, 0.12);
  color: var(--teal);
}

.modal-badge-cat {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
}

.modal-body-section {
  margin-bottom: 1.5rem;
}

.modal-body-section h4 {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body-section p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* Mini Mockup / Sandbox widgets inside modal */
.modal-sandbox-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  margin-top: 1rem;
}

/* Sheets Mini Simulator */
.mini-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mini-sheet-table th {
  background: #0f9d58;
  color: #ffffff;
  padding: 0.45rem 0.6rem;
  text-align: left;
  font-weight: 600;
}

.mini-sheet-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #e2dcd2;
  color: var(--ink);
  background: #ffffff;
}

.mini-sheet-table tr.new-row td {
  background: #e8f5e9;
  animation: sheet-highlight 2s ease-out;
}

@keyframes sheet-highlight {
  from { background: #c8e6c9; }
  to { background: #ffffff; }
}

/* Email Mini Simulator */
.mini-email-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mini-email-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.mini-email-header strong {
  color: var(--ink);
}

.mini-email-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.mini-email-kpi {
  background: var(--bg-alt);
  padding: 0.6rem;
  border-radius: 8px;
  text-align: center;
}

.mini-email-kpi span {
  display: block;
  font-size: 0.68rem;
  color: var(--ink-soft);
}

.mini-email-kpi strong {
  font-size: 0.95rem;
  color: var(--accent-deep);
}

/* Profitability mini calculation card */
.mini-profit-calc {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.profit-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.profit-row.total {
  border-top: 2px dashed var(--border);
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  font-weight: 800;
  color: var(--teal);
  font-size: 0.95rem;
}

.modal-actions-footer {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
