/* ===== Phase Stepper ===== */
.phase-stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding: 0 10px;
}

/* Connecting line behind the circles */
.phase-stepper::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #dee2e6;
  z-index: 0;
}

.phase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.phase-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  background: #adb5bd;
  transition: background-color 0.3s, transform 0.3s;
}

.phase-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #6c757d;
  text-align: center;
  white-space: nowrap;
}

/* States */
.phase-step.pending .phase-circle {
  background: #adb5bd;
}

.phase-step.completed .phase-circle {
  background: #198754;
}

.phase-step.active .phase-circle {
  background: #0d6efd;
  animation: pulse-phase 1.5s ease-in-out infinite;
}

.phase-step.failed .phase-circle {
  background: #dc3545;
}

.phase-step.completed .phase-label,
.phase-step.active .phase-label {
  color: #212529;
  font-weight: 500;
}

@keyframes pulse-phase {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(13, 110, 253, 0);
  }
}

/* ===== Utility: Monospace ===== */
.text-mono {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ===== Card hover on dashboard table ===== */
.table-hover tbody tr {
  transition: background-color 0.15s;
}

/* ===== Subtle scrollbar for pre blocks ===== */
pre {
  max-height: 400px;
  overflow-y: auto;
}

/* ===== Footer always at bottom ===== */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.container {
  flex: 1;
}

/* ===== Login Page ===== */
body.login-page {
  background: linear-gradient(135deg, #1a1c2e 0%, #2d1b4e 50%, #1a2a3e 100%);
}

body.login-page .card {
  border-radius: 12px;
}

body.login-page .card .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ===== Region Tags ===== */
.region-tag {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 2px;
  font-size: 0.7rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #e9ecef;
  color: #495057;
  border-radius: 3px;
  line-height: 1.6;
}

.region-tag-added {
  background: #d1e7dd;
  color: #0f5132;
}

.region-tag-removed {
  background: #f8d7da;
  color: #842029;
  text-decoration: line-through;
}

/* ===== Region Count Hover ===== */
.region-count {
  cursor: help;
  border-bottom: 1px dotted currentColor;
  font-size: 0.85rem;
}

/* ===== Quick Link Cards ===== */
a.card:hover {
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  transition: box-shadow 0.2s, transform 0.2s;
}
