body {
  background-color: #f4f4f9;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin-top: 0;
}

.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 500;
}

/* Demo Mode Banner */
.demo-banner {
  border: 3px solid #ff6b35;
  background: linear-gradient(135deg, #ffeb3b, #ff9800);
  color: #d84315;
  font-weight: bold;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Global Actions Section */
.global-actions-card {
  border-left: 5px solid #007bff;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.global-actions-card .card-header {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border-radius: 10px 10px 0 0;
}

.global-action-btn {
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Individual Instances Section */
.instances-card {
  border-left: 5px solid #28a745;
}

.instances-card .card-header {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
  border-radius: 10px 10px 0 0;
}

.instance-card {
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e9ecef;
}

.instance-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.instance-details {
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 5px;
  border-left: 3px solid #dee2e6;
}

.status-text {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.btn-custom {
  border-radius: 25px;
  font-size: 1rem;
  padding: 10px 20px;
  margin-bottom: 10px;
}

.text-success {
  color: #28a745 !important;
}

.text-danger {
  color: #dc3545 !important;
}

.text-warning {
  color: #ffc107 !important;
}

/* Header and Logo Styling */
.app-header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  padding: 1.5rem 0;
  margin: 0 0 2rem 0;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20" fill="white" fill-opacity="0.05"><circle cx="10" cy="10" r="2"/><circle cx="30" cy="10" r="2"/><circle cx="50" cy="10" r="2"/><circle cx="70" cy="10" r="2"/><circle cx="90" cy="10" r="2"/></svg>');
  background-repeat: repeat;
}

.header-content {
  position: relative;
  z-index: 1;
}

.logo {
  width: 140px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.app-title {
  color: white;
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.environment-nav {
  margin-top: 1rem;
}

.environment-nav .btn {
  border-radius: 20px;
  margin: 0 0.25rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.environment-nav .btn-primary {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: white;
}

.environment-nav .btn-outline-primary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

.environment-nav .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

.current-env-info {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  backdrop-filter: blur(10px);
}

.current-env-info h5 {
  color: white;
  margin-bottom: 0.5rem;
}

.current-env-info p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.current-env-info small {
  color: rgba(255, 255, 255, 0.6);
}

.nav-actions {
  margin-top: 1rem;
}

.nav-actions .btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

.nav-actions .btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-header {
    margin: 0 0 1rem 0;
    padding: 1rem 0;
  }
  
  .app-title {
    font-size: 1.5rem;
  }
  
  .app-subtitle {
    font-size: 0.9rem;
  }
  
  .logo {
    width: 100px;
  }
  
  .environment-nav .btn {
    margin: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .current-env-info {
    padding: 0.75rem;
    margin-top: 0.75rem;
  }
  
  .current-env-info h5 {
    font-size: 1.1rem;
  }
  
  .current-env-info p {
    font-size: 0.9rem;
  }
}

.alert-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.alert-lg {
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
}

.btn-group form {
  flex: 1;
}

/* Section Spacing */
.card.mb-5 {
  margin-bottom: 3rem !important;
}

/* Schedule Management Styles */
.add-schedule-card {
  border-left: 5px solid #17a2b8;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.add-schedule-card .card-header {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
  border-radius: 10px 10px 0 0;
}

.upcoming-card {
  border-left: 5px solid #28a745;
}

.upcoming-card .card-header {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
  border-radius: 10px 10px 0 0;
}

.schedule-list-card {
  border-left: 5px solid #6f42c1;
}

.schedule-list-card .card-header {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: white;
  border-radius: 10px 10px 0 0;
}

.upcoming-date-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.upcoming-date-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.upcoming-date-card.border-success {
  border-width: 2px !important;
  background: linear-gradient(135deg, #ffffff, #f8fff8);
}

/* Table styles */
.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.table-success {
  background-color: rgba(40, 167, 69, 0.1);
}

.table-secondary {
  background-color: rgba(108, 117, 125, 0.1);
}

/* Modal improvements */
.modal-content {
  border-radius: 10px;
  border: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border-radius: 10px 10px 0 0;
}

/* Form improvements */
.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Range-specific styles */
.schedule-ranges-card {
  border-left: 5px solid #fd7e14;
}

.schedule-ranges-card .card-header {
  background: linear-gradient(135deg, #fd7e14, #e8590c);
  color: white;
  border-radius: 10px 10px 0 0;
}

/* Period-specific styles */
.periods-card {
  border-left: 5px solid #6f42c1;
}

.periods-card .card-header {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: white;
  border-radius: 10px 10px 0 0;
}

.periods-card .card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.periods-card .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.periods-card .border-success {
  border-width: 2px !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Schedule type toggles */
.form-check-inline {
  margin-right: 2rem;
}

.form-check-input:checked + .form-check-label {
  font-weight: 600;
  color: #007bff;
}

/* Dynamic field transitions */
#singleDateFields, #rangeFields {
  transition: all 0.3s ease-in-out;
}

/* Badge improvements */
.badge-info {
  background-color: #17a2b8;
}

/* Range indicator in upcoming dates */
.text-info {
  font-size: 0.85rem;
  font-style: italic;
}

/* Healthcheck Styles */
.healthchecks-section {
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 5px;
  border-left: 3px solid #17a2b8;
}

.healthchecks-scrollable {
  height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  /* border: 1px solid #ccc; */
}

.healthcheck-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  background-color: white;
  border: 1px solid #e9ecef;
}

.healthcheck-item:last-child {
  margin-bottom: 0;
}

.healthcheck-status {
  margin-left: 8px;
  white-space: nowrap;
}

.healthcheck-item .badge {
  font-size: 0.6rem;
  padding: 2px 6px;
  margin-right: 4px;
}

.healthcheck-item .text-success {
  color: #28a745 !important;
}

.healthcheck-item .text-danger {
  color: #dc3545 !important;
}

.healthcheck-item .text-info {
  color: #17a2b8 !important;
}

.healthcheck-item .text-muted {
  color: #6c757d !important;
}

.healthcheck-item .fas {
  font-size: 0.8rem;
}

.healthcheck-item small {
  font-size: 0.75rem;
}

/* Responsive healthcheck styles */
@media (max-width: 768px) {
  .healthcheck-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .healthcheck-status {
    margin-left: 0;
    margin-top: 2px;
  }
}

/* Operations Progress Styles */
.operations-progress-card {
  border-left: 5px solid #ffc107;
  background: linear-gradient(135deg, #ffffff, #fffbf0);
}

.operations-progress-card .card-header {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: white;
  border-radius: 10px 10px 0 0;
}

.operation-progress {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.operation-progress:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.operation-progress .progress {
  height: 20px;
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.operation-progress .progress-bar {
  font-size: 12px;
  line-height: 20px;
  transition: width 0.3s ease;
}

.operation-details {
  max-height: 200px;
  overflow-y: auto;
  border-top: 1px solid #dee2e6;
  padding-top: 10px;
  margin-top: 10px;
}

.operation-details small {
  padding: 2px 0;
  line-height: 1.4;
}

.operation-details .fas {
  width: 16px;
  text-align: center;
  margin-right: 8px;
}

/* Auto-refresh indicator */
.auto-refresh-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(23, 162, 184, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 1000;
  display: none;
}

.auto-refresh-indicator.active {
  display: block;
}

/* Pulsing animation for in-progress operations */
.operation-progress[data-status="in_progress"] {
  animation: pulse-operation 2s infinite;
}

@keyframes pulse-operation {
  0% { 
    box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.4);
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(23, 162, 184, 0);
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(23, 162, 184, 0);
  }
}

/* Disable buttons during operations */
.global-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Operation completed state */
.operation-progress[data-status="completed"] {
  border-left: 4px solid #28a745;
  background: linear-gradient(135deg, #f8fff8, #ffffff);
}

.operation-progress[data-status="failed"] {
  border-left: 4px solid #dc3545;
  background: linear-gradient(135deg, #fff8f8, #ffffff);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .operation-progress {
    padding: 10px;
  }
  
  .operation-details {
    max-height: 150px;
  }
  
  .auto-refresh-indicator {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    font-size: 11px;
  }
}

.multiselect {
  width: 100%;
}

.selectBox {
  position: relative;
}

.selectBox select {
  width: 100%;
}

.overSelect {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

#selectOptions {
  display: none;
  border: 0.5px #7c7c7c solid;
  background-color: #ffffff;
  max-height: 150px;
  overflow-y: scroll;
  overflow-x: hidden;
}

#selectOptions label {
  display: block;
  font-weight: normal;
  display: block;
  white-space: nowrap;
  min-height: 1.2em;
  background-color: #ffffff00;
  padding: .375rem 2.25rem 0 .75rem;
}

#selectOptions div:hover {
  background-color: #1e90ff;
}

#terminal {
  color: #0f0;
  background-color: #000;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 20px;
  height: 50vh;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid #333;
}

.btn-dark-hover-light {
  background-color: #212529; /* dark */
  color: #fff;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-dark-hover-light:hover {
  background-color: #f8f9fa; /* light */
  color: #000;
  border: 1px solid #ced4da; /* optional border */
}

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.stream-progress {
  width: 100px;
}

.stream-progress-bar {
  position: relative;
}

.stream-progress-text {
  position: absolute;
  top: 8px;
}

.copy-btn {
  position: absolute;
  top: calc(20px + 0.5rem);
  right: calc(40px + 0.5rem);
  z-index: 1;
}

.swal-no-wrap .swal2-html-container,
.swal-no-wrap .swal2-content {
  white-space: nowrap;
  overflow: hidden;
  width: auto !important;
  max-width: 95vw
}

.swal-no-wrap-text {
  white-space: nowrap;
  overflow: hidden;
}

.swal-no-select {
  user-select: none;
}

.tooltip .tooltip-inner {
  white-space: nowrap;
  max-width: none !important;
  width: auto !important;
  min-width: 0 !important;
  background-color: #ffffe1 !important;
  border: 1px solid #ddd;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.right-aligned .tooltip-inner {
  text-align: right !important;
}

.tooltip .tooltip-inner small {
  font-size: 0.65rem;
}

.tooltip .tooltip-inner .text-danger {
  color: #dc3545 !important;
}

.tooltip .tooltip-inner .text-success {
  color: #28a745 !important;
}

.tooltip .tooltip-inner .text-warning {
  color: #ffc107 !important;
}

.tooltip .tooltip-inner .text-info {
  color: #17a2b8 !important;
}

.tooltip .tooltip-inner .text-muted {
  color: #6c757d !important;
}

.tooltip .tooltip-inner .text-primary {
  color: #007bff !important;
}

.tooltip.bs-tooltip-top .arrow::before {
  border-top-color: #ddd !important;
}

.tooltip.bs-tooltip-bottom .arrow::before {
  border-bottom-color: #ddd !important;
}

.tooltip.bs-tooltip-left .arrow::before {
  border-left-color: #ddd !important;
}

.tooltip.bs-tooltip-right .arrow::before {
  border-right-color: #ddd !important;
}

.introjs-tooltipCustom .introjs-tooltiptext {
  white-space: normal;
}

.introjs-dont-show {
  margin-top: 20px;
  font-size: 0.8em;
  color: #6c757d !important;
}

.swal2-box-small {
  width: 250px !important;
  padding: 1em !important;
  font-size: 14px !important;
}

.swal2-title-small {
  font-size: 16px !important;
  font-weight: normal;
  margin-bottom: 10px;
}

@keyframes repeatProgress {
  from { width: 0%; }
  to { width: 100%; }
}
