:root {
  /* Premium Light Mode Defaults */
  --aca-bg-dark: #f8fafc;
  /* Crisp Light Background */
  --aca-bg-card: #ffffff;
  /* Pure White Card */
  --aca-bg-card-hover: #f1f5f9;
  /* Light Hover */

  /* Brand Colors - Premium Light Mode Adjusted */
  --aca-primary: #3b82f6;
  --aca-primary-hover: #2563eb;
  --aca-text-main: #0f172a;
  /* Dark Slate Text */
  --aca-text-muted: #64748b;
  /* Muted Slate Text */
  --aca-border-color: #e2e8f0;
  /* Soft Light Border */

  /* Glassmorphism Settings */
  --aca-glass-bg: rgba(255, 255, 255, 0.85);
  --aca-glass-border: rgba(255, 255, 255, 0.6);

  /* Gradients & Shadows */
  --aca-gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --aca-card-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --aca-success: #10b981;

  --aca-input-bg: #f8fafc;
  /* Seamless Light mode input bg */
  --aca-input-bg-focus: #ffffff;
}

/* Dark Mode Overrides */
.dark-mode {
  /* Deep OLED/Midnight background base */
  --aca-bg-dark: #09090b;
  --aca-bg-card: #18181b;
  --aca-bg-card-hover: #27272a;

  --aca-primary: #3b82f6;
  --aca-primary-hover: #60a5fa;
  --aca-text-main: #f8fafc;
  --aca-text-muted: #94a3b8;
  --aca-border-color: rgba(255, 255, 255, 0.1);

  /* Premium Glassmorphism */
  --aca-glass-bg: rgba(24, 24, 27, 0.7);
  --aca-glass-border: rgba(255, 255, 255, 0.08);
  --aca-card-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  --aca-input-bg: rgba(0, 0, 0, 0.25);
  /* Dark mode input bg */
  --aca-input-bg-focus: rgba(0, 0, 0, 0.4);
}

/* Scoped Reset */
.aca-wrapper * {
  box-sizing: border-box;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
}

.aca-wrapper {
  background-color: var(--aca-bg-dark);
  color: var(--aca-text-main);
  min-height: 100vh;
  display: flex;
  position: relative;
  /* allow document scroll */
}

/* Sidebar */
.aca-sidebar {
  width: 280px;
  background-color: var(--aca-bg-card);
  border-right: 1px solid var(--aca-border-color);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  /* Sticky sidebar behavior */
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  z-index: 40;
  flex-shrink: 0;
}

.aca-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--aca-text-main);
}

.aca-logo i {
  color: var(--aca-primary);
}

.aca-nav-menu {
  list-style: none;
  margin-bottom: 2.5rem;
  padding: 0;
  /* Reset padding for ul */
}

.aca-nav-item {
  margin-bottom: 0.5rem;
}

.aca-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--aca-text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-weight: 500;
}

.aca-nav-link:hover,
.aca-nav-link.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--aca-primary);
}

/* Main Content Wrapper */
.aca-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Dashboard Grid */
.aca-dashboard-grid {
  padding: 2rem 2rem 0rem 2rem !important;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* Config Section - Unified Unified Layout */
.aca-unified-header-container {
  margin-bottom: 2rem;
}

.aca-wrapper .aca-unified-config-card {
  background: var(--aca-bg-card) !important;
  border: 1px solid var(--aca-border-color) !important;
  border-radius: 1rem !important;
  padding: 12px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 2rem !important;
  box-shadow: var(--aca-card-shadow) !important;
  backdrop-filter: blur(10px) !important;
  width: 100% !important;
}

.aca-wrapper .aca-config-name-group {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.4rem !important;
}

.aca-config-divider {
  width: 1px;
  height: 44px;
  background: var(--aca-border-color);
  opacity: 0.6;
  margin: 0 1rem; /* Add some margin around the divider */
}

.aca-config-assets-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 320px;
  align-items: flex-start; /* Headers align left within the group */
  margin-left: auto; /* Final insurance to push to the absolute right */
}

.aca-wrapper .aca-mini-label {
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--aca-text-muted) !important;
  font-weight: 700 !important;
  margin-bottom: 2px !important;
  display: block !important;
}

.aca-wrapper .aca-unified-input {
  background: var(--aca-input-bg) !important;
  border: 1px solid var(--aca-border-color) !important;
  border-radius: 0.6rem !important;
  padding: 6px 12px !important;
  color: var(--aca-text-main) !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  outline: none !important;
  transition: all 0.2s !important;
  width: 100% !important;
  height: 40px !important;
  display: block !important;
}

.aca-wrapper .aca-unified-input:focus {
  border-color: var(--aca-primary) !important;
  background: var(--aca-input-bg-focus) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.aca-asset-actions-compact {
  display: flex;
  gap: 1rem;
}

@media (max-width: 992px) {
  .aca-unified-config-card {
    gap: 1.5rem;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .aca-unified-config-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  .aca-config-divider {
    display: none;
  }
  .aca-config-assets-group {
    min-width: unset;
  }
}

.aca-config-name-section {
  margin-bottom: 2rem;
}

.aca-target-assets-section {
  margin-bottom: 2rem;
}

.aca-section-header {
  margin-bottom: 1.5rem;
}

.aca-section-header h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--aca-text-main);
}

.aca-section-header p {
  font-size: 0.9rem;
  color: var(--aca-text-muted);
}

.aca-asset-actions {
  display: flex;
  gap: 1rem;
}

.aca-wrapper .aca-asset-trigger-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--aca-border-color) !important;
  color: var(--aca-text-muted) !important;
  padding: 5px 15px !important;
  border-radius: 2rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  font-size: 0.9rem !important;
  height: 34px !important;
  line-height: normal !important;
}

.aca-asset-trigger-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--aca-text-main);
  border-color: var(--aca-primary);
  transform: translateY(-1px);
}

.aca-asset-trigger-btn i {
  color: var(--aca-primary);
}

.aca-asset-trigger-btn .aca-badge {
  background: var(--aca-primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-weight: 700;
}

/* TF Section */
.aca-tf-section {
  margin-bottom: 3rem;
}

.aca-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

/* Modern TF Card */
.aca-wrapper .aca-tf-card {
  background: var(--aca-bg-card) !important;
  border: 1px solid var(--aca-border-color) !important;
  border-radius: 1rem !important;
  overflow: hidden !important;
  position: relative !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
}

.aca-tf-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 15px 30px -5px rgba(0, 0, 0, 0.1),
    0 0 15px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.aca-wrapper .aca-card-status-indicator {
  height: 3px !important;
  width: 100% !important;
  background: #334155 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

.aca-tf-card.active-tf {
  border-color: var(--aca-primary);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.3),
    0 0 20px rgba(59, 130, 246, 0.1);
}

.aca-tf-card.active-tf .aca-card-status-indicator {
  background: var(--aca-gradient-accent);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.aca-card-header {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.aca-card-header i {
  color: var(--aca-primary);
  font-size: 1.1rem;
}

.aca-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--aca-text-main);
  margin: 0;
}

.aca-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.aca-select-wrapper label {
  display: block;
  font-size: 0.8rem;
  color: var(--aca-text-muted);
  margin-bottom: 0.2rem;
}

.aca-modern-select {
  width: 100%;
  background: var(--aca-input-bg);
  border: 1px solid var(--aca-border-color);
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  color: var(--aca-text-main);
  outline: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.aca-modern-select option {
  background-color: var(--aca-bg-card);
  color: var(--aca-text-main);
}

.aca-modern-select:focus {
  border-color: var(--aca-primary);
}

.aca-card-summary {
  font-size: 0.85rem;
  color: var(--aca-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.aca-btn-card-action {
  margin-top: auto;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--aca-border-color);
  color: var(--aca-text-muted);
  padding: 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.9rem;
}

.aca-btn-card-action:hover {
  border-color: var(--aca-primary);
  color: var(--aca-primary);
  background: rgba(59, 130, 246, 0.05);
}

/* Alerts Section */
.aca-alerts-section {
  margin-bottom: 3rem;
}

.aca-alert-box {
  background: var(--aca-bg-card);
  border: 1px solid var(--aca-border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aca-alert-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.aca-alert-option:last-child {
  border-bottom: none;
}

.aca-alert-title {
  display: block;
  font-weight: 600;
  color: var(--aca-text-main);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.aca-alert-title i {
  width: 20px;
  color: var(--aca-primary);
}

.aca-alert-desc {
  font-size: 0.85rem;
  color: var(--aca-text-muted);
}

.aca-alert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.aca-alert-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 992px) {
  .aca-alert-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.aca-main-actions {
  display: flex;
  justify-content: flex-end;
}

/* Premium Buttons */
.aca-wrapper .aca-btn-primary {
  background: var(--aca-gradient-accent) !important;
  color: white !important;
  border: none !important;
  padding: 0.8rem 1.5rem !important;
  border-radius: 0.5rem !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow:
    0 4px 6px -1px rgba(99, 102, 241, 0.4),
    0 2px 4px -1px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  position: relative !important;
  overflow: hidden !important;
  height: 42px !important;
  line-height: normal !important;
}

.aca-btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.aca-btn-primary:hover::after {
  opacity: 1;
}

.aca-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 20px -5px rgba(99, 102, 241, 0.6),
    0 4px 6px -2px rgba(99, 102, 241, 0.4);
}

.aca-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.aca-wrapper .aca-btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.8rem 1.5rem !important;
  border-radius: 0.5rem !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  box-shadow:
    0 4px 6px -1px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  height: 42px !important;
  line-height: normal !important;
}

.aca-btn-save::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.aca-btn-save:hover::after {
  opacity: 1;
}

.aca-btn-save:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 20px -5px rgba(16, 185, 129, 0.6),
    0 4px 6px -2px rgba(16, 185, 129, 0.4);
}

.aca-btn-save:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.aca-btn-premium-green {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  margin-top: auto;
  width: 100%;
  padding: 0.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.aca-btn-premium-green:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 8px 15px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
  color: #10b981;
}

/* Modal Variations */
.aca-modal-content.aca-modal-lg {
  width: 500px;
  max-width: 95%;
  max-height: 85vh;
  height: auto;
  display: flex;
  flex-direction: column;
}

.aca-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* Custom scrollbar for modal body */
.aca-modal-body::-webkit-scrollbar {
  width: 6px;
}

.aca-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.aca-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.aca-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Premium Indicator Settings */
.aca-indicator-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--aca-border-color);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.aca-confluence-setting {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--aca-border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.aca-confluence-setting .aca-form-group-sm {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.aca-confluence-setting label {
  margin-bottom: 0;
  max-width: 70%;
}

.aca-confluence-setting input {
  width: 60px;
  text-align: center;
}

.aca-indicator-group:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.aca-group-header {
  background: transparent;
  padding: 0.35rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.aca-indicator-group.expanded .aca-group-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom-color: var(--aca-border-color);
}

.aca-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--aca-text-main);
  font-size: 0.95rem;
}

.aca-chevron-icon {
  font-size: 0.8rem;
  color: var(--aca-text-muted);
  transition: transform 0.2s;
}

.aca-indicator-group.expanded .aca-chevron-icon {
  transform: rotate(90deg);
  color: var(--aca-primary);
}

.aca-indicator-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  background: rgba(0, 0, 0, 0.1);
}

.aca-indicator-group.expanded .aca-indicator-content {
  max-height: 5000px;
  transition: max-height 0.5s ease-in-out;
}

.aca-config-grid {
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.aca-form-group-sm {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aca-form-group-sm label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aca-text-muted);
  font-weight: 600;
}

.aca-form-group-sm input {
  background: var(--aca-input-bg);
  border: 1px solid var(--aca-border-color);
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  color: var(--aca-text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
  width: 100%;
}

.aca-form-group-sm input:focus {
  border-color: var(--aca-primary);
  background: var(--aca-input-bg-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Remove spinner buttons from number inputs */
.aca-form-group-sm input[type="number"]::-webkit-inner-spin-button,
.aca-form-group-sm input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Utils */
.aca-hidden {
  display: none !important;
}

.aca-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.aca-modal-overlay:not(.aca-hidden) {
  opacity: 1;
  pointer-events: auto;
}

.aca-modal-content {
  background: var(--aca-bg-card);
  width: 420px; /* Reduced from 500px */
  max-width: 90%;
  border-radius: 0.75rem; /* Slightly tighter */
  border: 1px solid var(--aca-border-color);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.5),
    0 10px 10px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.aca-modal-overlay:not(.aca-hidden) .aca-modal-content {
  transform: scale(1);
}

.aca-modal-header {
  padding: 0.75rem 1.25rem; /* Reduced from 1.25rem 1.5rem */
  border-bottom: 1px solid var(--aca-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.aca-modal-title {
  font-size: 0.95rem; /* Reduced from 1.1rem */
  font-weight: 700;
  color: var(--aca-text-main);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aca-close-modal-btn {
  background: transparent;
  border: none;
  color: var(--aca-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.aca-close-modal-btn:hover {
  color: var(--aca-text-main);
}

.aca-modal-search {
  padding: 0.75rem 1.25rem; /* Reduced padding */
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.aca-search-icon {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--aca-text-muted);
  font-size: 0.85rem;
}

.aca-search-input {
  width: 100%;
  background: var(--aca-input-bg);
  border: 1px solid var(--aca-border-color);
  padding: 0.5rem 0.75rem 0.5rem 2.25rem; /* Reduced padding */
  border-radius: 0.5rem;
  color: var(--aca-text-main);
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.aca-search-input:focus {
  border-color: var(--aca-primary);
}

.aca-assets-list {
  max-height: 350px; /* Slightly shorter */
  overflow-y: auto;
  padding: 0.25rem;
}

.aca-asset-option-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem; /* Reduced padding */
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 0.1rem 0.25rem; /* Reduced margin */
  border-radius: 0.4rem;
}

.aca-asset-option-item:last-child {
  border-bottom: none;
}

.aca-asset-option-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.aca-asset-option-item.selected {
  background-color: rgba(59, 130, 246, 0.12);
  border-left: 3px solid var(--aca-primary);
}

/* Custom Checkbox */
.aca-asset-checkbox {
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--aca-text-muted);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.aca-asset-checkbox:checked {
  background: var(--aca-primary);
  border-color: var(--aca-primary);
}

.aca-asset-checkbox:checked::after {
  content: "\f00c";
  /* FontAwesome check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.7rem;
  color: white;
}

.aca-asset-info {
  display: flex;
  flex-direction: column;
}

.aca-asset-symbol {
  font-weight: 700;
  font-size: 0.85rem; /* Smaller font */
  color: var(--aca-text-main);
  line-height: 1.2;
}

.aca-asset-name {
  font-size: 0.75rem; /* Smaller font */
  color: var(--aca-text-muted);
  line-height: 1.2;
}

.aca-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem; /* Reduced padding */
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(0, 0, 0, 0.1);
}

.aca-btn-outline {
  background: transparent;
  border: 1px solid var(--aca-border-color);
  color: var(--aca-text-muted);
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.aca-btn-outline:hover {
  border-color: var(--aca-text-main);
  color: var(--aca-text-main);
  background: rgba(255, 255, 255, 0.03);
}

.aca-modal-footer .aca-btn-primary,
.aca-modal-footer .aca-btn-outline {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 0.4rem;
}

.aca-modal-selection-actions .aca-btn-outline {
  padding: 0.35rem 0.75rem; /* Even more compact for these buttons */
  font-size: 0.8rem;
  border-radius: 2rem;
}

/* Mobile Responsiveness */
.aca-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--aca-bg-card);
  border-bottom: 1px solid var(--aca-border-color);
  position: sticky;
  top: 0;
  z-index: 30;
}

.aca-mobile-menu-btn {
  background: transparent;
  border: none;
  color: var(--aca-text-main);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.aca-mobile-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--aca-text-main);
}

.aca-sidebar-close-btn {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--aca-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.aca-sidebar-close-btn:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--aca-primary);
  transform: rotate(90deg);
}

.dark-mode .aca-sidebar-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.aca-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35;
  backdrop-filter: blur(2px);
}

/* Breakpoint for Tablets and below */
@media (max-width: 992px) {
  .aca-wrapper {
    flex-direction: column;
  }

  .aca-sidebar {
    position: fixed;
    left: 0;
    top: 80px;
    height: calc(100vh - 80px);
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 40;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .aca-sidebar.active {
    transform: translateX(0);
  }

  .aca-sidebar-close-btn {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    align-self: flex-end;
    margin-bottom: 1.5rem;
  }

  .aca-sidebar-overlay.active {
    display: block;
  }

  .aca-main-content {
    width: 100%;
    min-height: auto;
  }

  .aca-mobile-header {
    display: flex;
  }

  .aca-dashboard-grid {
    padding: 1rem;
  }
}

/* Breakpoint for Mobile */
@media (max-width: 768px) {
  .aca-cards-container {
    grid-template-columns: 1fr;
  }

  .aca-config-grid {
    grid-template-columns: 1fr;
  }

  .aca-section-header {
    text-align: center;
  }

  .aca-asset-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .aca-asset-trigger-btn {
    width: 100%;
    justify-content: center;
  }

  .aca-modal-content.aca-modal-lg {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  /* Fix for Asset Modal crawling behind bottom bar on mobile */
  #aca-asset-modal .aca-modal-content {
    max-height: 70vh !important; /* Force space for bottom bar */
    margin-bottom: 80px; /* Lift it up above the mobile menu */
    display: flex;
    flex-direction: column;
    border-radius: 1rem; /* Restore radius on mobile for this specific modal if desired, or keep 0 */
  }

  #aca-asset-modal .aca-assets-list {
    flex: 1;
    max-height: none; /* Let flex handle height */
    min-height: 0;
    overflow-y: auto;
  }

  .aca-modal-content {
    width: 95%;
  }

  .aca-confluence-setting {
    flex-direction: column;
    align-items: flex-start;
  }

  .aca-confluence-setting .aca-form-group-sm {
    width: 100%;
  }

  .d-mobile-none {
    display: none !important;
  }

  /* Fix for AI Report Switch crowding */
  .aca-alert-option {
    gap: 1rem;
  }

  .aca-alert-info {
    flex: 1;
    min-width: 0;
  }

  .aca-alert-option .aca-switch {
    flex-shrink: 0;
  }
}

.aca-btn-outline {
  background: transparent;
  border: 1px solid var(--aca-border-color);
  color: var(--aca-text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.aca-btn-outline:hover {
  border-color: var(--aca-text-muted);
  color: var(--aca-text-main);
}

/* Scrollbar for list */
.aca-assets-list::-webkit-scrollbar {
  width: 6px;
}

.aca-assets-list::-webkit-scrollbar-track {
  background: transparent;
}

.aca-assets-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.aca-assets-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Premium Toggle Switch */
.aca-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.aca-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.aca-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid var(--aca-border-color);
}

.aca-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--aca-text-muted);
  transition: 0.4s;
  border-radius: 50%;
}

.aca-switch input:checked + .aca-slider {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: var(--aca-primary);
}

.aca-switch input:checked + .aca-slider:before {
  transform: translateX(20px);
  background-color: var(--aca-primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.aca-switch input:focus + .aca-slider {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Global Premium Scrollbar (scoped to wrapper if possible or leave global if desired, user asked for global previous)
   Leaving global as user liked it 
*/
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Firefox support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* --- Notification Toast System --- */
.aca-notification-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

@media (max-width: 768px) {
  .aca-notification-container {
    bottom: 90px;
    right: 1rem;
    left: 1rem;
    align-items: center;
  }

  .aca-notification {
    min-width: unset;
    width: 100%;
  }
}

.aca-notification {
  background: var(--aca-bg-card);
  border: 1px solid var(--aca-border-color);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: aca-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translateX(100%);
  opacity: 0;
  backdrop-filter: blur(10px);
}

.aca-notification.success {
  border-left: 4px solid var(--aca-success);
}

.aca-notification.error {
  border-left: 4px solid #ef4444;
}

.aca-notification.info {
  border-left: 4px solid var(--aca-primary);
}

.aca-notification-icon {
  font-size: 1.25rem;
}

.aca-notification.success .aca-notification-icon {
  color: var(--aca-success);
}

.aca-notification.error .aca-notification-icon {
  color: #ef4444;
}

.aca-notification.info .aca-notification-icon {
  color: var(--aca-primary);
}

.aca-notification-content {
  flex: 1;
}

.aca-notification-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--aca-text-main);
  margin-bottom: 0.2rem;
}

.aca-notification-message {
  font-size: 0.85rem;
  color: var(--aca-text-muted);
  line-height: normal;
}

.aca-notification-close {
  background: transparent;
  border: none;
  color: var(--aca-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  transition: color 0.2s;
}

.aca-notification-close:hover {
  color: var(--aca-text-main);
}

@keyframes aca-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes aca-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Star Icon for Important Indicators */
.aca-star-icon {
  font-size: 0.9rem;
  color: var(--aca-text-muted);
  margin-right: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aca-star-icon:hover {
  transform: scale(1.2);
  color: #eab308;
}

/* Active State (Starred) */
.aca-starred .aca-star-icon {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Report Detail Specific Styles */

/* Header Container */
.aca-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 2rem;
  margin-bottom: 2rem;
  background: var(--aca-bg-card);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--aca-border-color);
}

/* Left Column */
.aca-detail-header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.aca-detail-header-left h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  /* allow wrapping on small screens */
}

.aca-detail-header-left img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.aca-asset-price {
  font-size: 1.2rem;
  color: var(--aca-text-secondary);
  font-weight: normal;
}

.aca-signal-badge {
  font-size: 1rem;
  vertical-align: middle;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.aca-signal-badge.buy {
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.aca-signal-badge.sell {
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.2);
}

.aca-buy-btn-container {
  margin-top: 1rem;
}

.aca-buy-btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, #00c853 0%, #009624 100%);
  color: white;
  text-decoration: none;
  border-radius: 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.aca-buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
  background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
}

.aca-buy-btn i {
  margin-left: 0.5rem;
}

.aca-detail-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.7;
  color: var(--aca-text-secondary);
}

/* Right Column */
.aca-detail-header-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 400px;
  max-width: 100%;
}

/* Fear & Greed */
.aca-fg-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: flex-end;
}

.aca-fg-label {
  font-size: 0.65rem;
  color: var(--aca-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  opacity: 0.5;
  margin-top: 1px;
}

.aca-fg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--aca-text-primary);
  box-shadow: none;
}

.aca-fg-badge.greed {
  border-color: #00ff9d;
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  box-shadow: 0 2px 10px rgba(0, 255, 157, 0.1);
}

.aca-fg-badge.fear {
  border-color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
  box-shadow: 0 2px 10px rgba(255, 77, 77, 0.1);
}

.aca-fg-classification {
  opacity: 0.8;
  font-weight: normal;
  font-size: 0.8rem;
  border-left: 1px solid currentColor;
  padding-left: 0.5rem;
  margin-left: 0.1rem;
}

/* Mini Chart Card */
.aca-mini-chart-card {
  background: var(--aca-bg-card-hover);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--aca-border-color);
}

.aca-mini-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.aca-mini-chart-title {
  font-size: 0.7rem;
  color: var(--aca-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aca-mini-chart-title span {
  opacity: 0.7;
}

.aca-mini-chart-wrapper {
  position: relative;
  height: 90px;
  width: 100%;
}

/* Detail Grid (for TF Cards) */
.aca-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* TF Card specific styles (if not already covered globally) */
.aca-tf-header {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--aca-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aca-tf-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aca-text-primary);
}

.aca-tf-status {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
}

.aca-tf-status.satisfied {
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.aca-tf-status.unsatisfied {
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.2);
}

.aca-indicator-list {
  padding: 1.5rem 2rem;
}

.aca-indicator-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--aca-border-color);
}

.aca-indicator-item:last-child {
  border-bottom: none;
}

.aca-ind-name {
  font-weight: 500;
  color: var(--aca-text-primary);
}

.aca-ind-value {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--aca-text-secondary);
  text-align: right;
}

.aca-ind-signal {
  font-weight: bold;
  margin-left: 0.5rem;
}

.aca-ind-signal.BUY {
  color: #00ff9d;
}

.aca-ind-signal.SELL {
  color: #ff4d4d;
}

.aca-ind-signal.None {
  color: var(--aca-text-secondary);
  opacity: 0.7;
}

/* Mobile Specific Overrides */
@media (max-width: 768px) {
  /* Stack detail header */
  .aca-detail-header {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
    text-align: center;
  }

  .aca-detail-header-left h2 {
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Full width right column */
  .aca-detail-header-right {
    width: 100%;
    gap: 1.5rem;
  }

  /* Left col adjustments */
  .aca-detail-header-left h2 {
    font-size: 1.5rem;
    gap: 0.5rem;
  }

  .aca-asset-price {
    font-size: 1.25rem;
  }

  .aca-signal-badge {
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    width: fit-content;
    margin: 0.5rem auto 0;
  }

  /* Adjust FG container for mobile */
  .aca-fg-container {
    justify-content: center;
    width: 100%;
    margin-bottom: 1rem;
  }

  /* Stack cards in single column */
  .aca-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .aca-tf-card {
    border-radius: 1rem;
    box-shadow: var(--aca-card-shadow);
  }

  .aca-tf-header {
    padding: 1.25rem 1.5rem;
  }

  .aca-indicator-list {
    padding: 1rem 1.5rem;
  }

  .aca-buy-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  /* Backtesting Table to Card Layout */
  .aca-report-table-wrapper {
    background: transparent;
    border: none;
  }

  .aca-report-table thead {
    display: none; /* Hide headers on mobile */
  }

  .aca-report-table,
  .aca-report-table tbody,
  .aca-report-table tr,
  .aca-report-table td {
    display: block;
    width: 100%;
  }

  .aca-report-table tr {
    background: var(--aca-bg-card);
    border: 1px solid var(--aca-border-color);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    box-shadow: var(--aca-card-shadow);
    transition: transform 0.2s;
    position: relative;
  }

  .aca-report-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }

  .aca-report-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .aca-report-table td::before {
    content: attr(data-label);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--aca-text-secondary);
    text-align: left;
    flex: 1;
  }

  /* Custom styles for specific cells in card view */
  .aca-report-table td[data-label="Symbol Name"] {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 2px solid var(--aca-border-color);
    margin-bottom: 0.5rem;
    padding-top: 0;
  }

  .aca-report-table td[data-label="Symbol Name"]::before {
    display: none;
  }

  .aca-report-table td[data-label="Select"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: auto;
    border: none;
    padding: 0;
  }

  .aca-report-table td[data-label="Select"]::before {
    display: none;
  }

  /* Control Bar for Mobile */
  .aca-control-bar {
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .aca-filter-group {
    width: 100%;
  }

  .aca-filter-select {
    width: 100%;
    padding: 0.75rem;
    height: 48px; /* Touch friendly */
  }

  /* PnL Card for Mobile */
  .aca-pnl-card {
    padding: 1.25rem;
  }

  .aca-pnl-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .aca-pnl-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .aca-pnl-input-group {
    width: 100%;
  }

  .aca-input {
    width: 100%;
  }

  .aca-pnl-stats {
    grid-template-columns: 1fr;
  }

  /* AI Analysis Cards on Mobile */
  .aca-ai-analysis-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .aca-ai-header {
    padding: 1.25rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    align-items: center;
  }

  .aca-ai-title-wrapper {
    flex-direction: column;
    gap: 0.5rem;
  }

  .aca-ai-content {
    padding: 1.25rem;
    font-size: 0.95rem;
  }
}

/* Conclusion Section */
.aca-ai-conclusion-section {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.aca-ai-conclusion-box {
  background: var(--aca-bg-card);
  border: 1px solid var(--aca-border-color);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.aca-ai-conclusion-box .aca-ai-header h3 {
  color: var(--aca-primary);
}

/* Probability Bar Container */
.aca-probability-container {
  padding: 1.5rem;
  position: relative;
  width: 100%;
  background: var(--aca-bg-card);
  border: 1px solid var(--aca-border-color);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.aca-prob-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--aca-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.aca-prob-layout {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 600px;
}

.aca-prob-limit {
  font-weight: 700;
  color: var(--aca-text-main);
  font-size: 0.9rem;
  min-width: 35px;
}

.aca-prob-limit:first-child {
  text-align: right;
}

/* Bar Track */
.aca-prob-bar-track {
  flex: 1;
  height: 24px;
  background: #1e1e1e;
  /* Dark base */
  border-radius: 12px;
  position: relative;
  padding: 2px;
  /* For border effect */
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.aca-prob-bar-gradient {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #d32f2f 0%,
    /* Dark Red */ #f44336 25%,
    /* Red */ #f59e0b 50%,
    /* Orange/Yellow */ #84cc16 75%,
    /* Lime */ #10b981 100% /* Green */
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  /* Glass gloss overlay */
  background-image:
    linear-gradient(
      90deg,
      #d32f2f 0%,
      #f44336 25%,
      #f59e0b 50%,
      #84cc16 75%,
      #10b981 100%
    ),
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.1) 100%
    );
  background-blend-mode: overlay, normal;
}

/* Pointer Indicator */
.aca-prob-pointer {
  position: absolute;
  top: -10px;
  /* Overshoot top */
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

/* Blue Diamond Head */
.aca-prob-pointer-head {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #e0f2fe 0%, #3b82f6 50%, #1e40af 100%);
  transform: rotate(45deg);
  border: 2px solid #ffffff;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  margin-bottom: -8px;
  /* overlap stem */
  position: relative;
  z-index: 2;
}

/* Inner highlight for diamond */
.aca-prob-diamond {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.8) 0%,
    transparent 60%
  );
}

/* Vertical Stem/Bar */
.aca-prob-pointer-stem {
  width: 8px;
  height: 45px;
  background: linear-gradient(to right, #2563eb, #60a5fa, #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Glow effect specific to active theme? */
.dark-mode .aca-prob-pointer-head {
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

/* Responsive */
@media (max-width: 600px) {
  .aca-prob-layout {
    gap: 0.5rem;
  }

  .aca-prob-limit {
    font-size: 0.8rem;
  }
}

.aca-ai-analysis-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.aca-ai-card {
  background: var(--aca-bg-card);
  border: 1px solid var(--aca-border-color);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Soft shadow */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.aca-ai-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.aca-ai-header {
  background: linear-gradient(
    to right,
    rgba(59, 130, 246, 0.05),
    rgba(139, 92, 246, 0.05)
  );
  border-bottom: 1px solid var(--aca-border-color);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aca-ai-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.aca-ai-title-wrapper i {
  font-size: 1.2rem;
  color: var(--aca-primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.aca-ai-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--aca-text-main);
  letter-spacing: 0.02em;
}

.aca-ai-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  /* Gold/Amber for Premium */
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.aca-ai-badge-valuation {
  background: rgba(108, 99, 255, 0.1) !important;
  color: #6c63ff !important;
  border: 1px solid rgba(108, 99, 255, 0.2) !important;
  box-shadow: none !important;
}

.aca-ai-badge-gemini {
  background: rgba(52, 152, 219, 0.1) !important;
  color: #3498db !important;
  border: 1px solid rgba(52, 152, 219, 0.2) !important;
  box-shadow: none !important;
}

.aca-ai-content {
  padding: 2rem;
  font-size: 1rem;
  color: var(--aca-text-main);
  line-height: 1.7;
}

/* Typography inside AI Content */
.aca-ai-content p {
  margin-bottom: 1.25rem;
}

.aca-ai-content p:last-child {
  margin-bottom: 0;
}

.aca-ai-content strong,
.aca-ai-content b {
  color: var(--aca-primary);
  font-weight: 700;
}

.aca-ai-content ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.aca-ai-content li {
  margin-bottom: 0.5rem;
  position: relative;
  list-style: none;
  /* Custom bullet */
}

.aca-ai-content li::before {
  content: "•";
  color: var(--aca-primary);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.aca-ai-content a,
.aca-news-link {
  color: #3b82f6 !important; /* Vibrant Blue */
  text-decoration: underline;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.aca-news-link::after {
  content: "\f08e"; /* Font Awesome External Link Icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
  opacity: 0.8;
}

.aca-ai-content a:hover,
.aca-news-link:hover {
  opacity: 0.8;
  color: #2563eb !important;
  text-decoration: none;
}

/* Tech Card Specifics */
.aca-tech-card .aca-ai-header {
  border-bottom-color: rgba(59, 130, 246, 0.2);
  /* Blue accent */
}

/* Fund Card Specifics */
.aca-fund-card .aca-ai-header {
  border-bottom-color: rgba(16, 185, 129, 0.2);
  /* Green accent */
}

.aca-fund-card .aca-ai-title-wrapper i {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.aca-no-data {
  color: var(--aca-text-muted);
  font-style: italic;
  opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .aca-ai-analysis-container {
    grid-template-columns: 1fr;
    /* Stack on mobile */
  }
}

/* -------------------------------------------------------------------------- */
/*                               Guide Page Styles                            */
/* -------------------------------------------------------------------------- */

.aca-guide-section {
  position: relative;
  padding: 1rem 0;
}

.aca-guide-step-number {
  flex-shrink: 0;
}

/* Premium Card Variation for Guide */
.aca-card-premium {
  background: var(--aca-bg-card);
  border: 1px solid var(--aca-border-color);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.aca-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--aca-card-shadow);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Process Premium Wrapper (Light Mode Default) */
.aca-process-premium-wrapper {
  position: relative;
  padding: 3rem 1rem;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Override */
.dark-mode .aca-process-premium-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.aca-process-premium-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(59, 130, 246, 0.05) 0%,
    transparent 70%
  );
  z-index: 1;
}

/* Scanner Line Effect */
.aca-process-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--aca-primary),
    transparent
  );
  box-shadow: 0 0 15px var(--aca-primary);
  opacity: 0.5;
  z-index: 5;
  animation: scanVertical 8s linear infinite;
}

@keyframes scanVertical {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(600px);
    opacity: 0;
  }
}

/* Flow Container */
.aca-process-flow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  gap: 1rem;
  margin-top: 3rem;
}

.aca-flow-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards;
}

.aca-flow-center {
  flex: 1.2;
}

/* Flow Card (Light Mode Default) */
.aca-flow-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Card Override */
.dark-mode .aca-flow-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.aca-flow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--aca-primary);
}

.dark-mode .aca-flow-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* AI Core Card Special Styling */
.aca-ai-core {
  background: #fdf4ff; /* Light purple tint */
  border-color: rgba(139, 92, 246, 0.3);
}

.dark-mode .aca-ai-core {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 0 30px -10px rgba(139, 92, 246, 0.15);
}

.aca-ai-core:hover {
  box-shadow: 0 0 30px -5px rgba(139, 92, 246, 0.25);
}

/* Icon Box (Light Mode Default) */
.aca-flow-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--aca-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--aca-primary);
  position: relative;
  background: #eff6ff; /* Light blue tint */
}

/* Dark Mode Icon Box Override */
.dark-mode .aca-flow-icon-box {
  background: rgba(0, 0, 0, 0.2);
}

.aca-flow-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--aca-primary);
  opacity: 0;
  animation: rippleEffect 3s infinite;
}

/* Content */
.aca-flow-content h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--aca-text-main);
}

.aca-flow-content p {
  font-size: 0.8rem;
  color: var(--aca-text-muted);
  line-height: 1.4;
}

/* Arrow */
.aca-flow-arrow {
  color: var(--aca-text-muted);
  opacity: 0.3;
  font-size: 1.2rem;
  animation: pulseArrow 2s infinite ease-in-out;
}

/* AI Particles (Simple CSS implementation) */
.aca-ai-particles::before,
.aca-ai-particles::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #8b5cf6;
  border-radius: 50%;
  animation: floatParticle 3s infinite;
  opacity: 0;
}

.aca-ai-particles::before {
  top: 20%;
  left: 20%;
  animation-delay: 0.5s;
}
.aca-ai-particles::after {
  bottom: 20%;
  right: 20%;
  animation-delay: 1.5s;
}

/* Keyframes */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rippleEffect {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.8;
    border-width: 2px;
  }
  100% {
    width: 220%;
    height: 220%;
    opacity: 0;
    border-width: 0;
  }
}

@keyframes pulseArrow {
  0%,
  100% {
    opacity: 0.3;
    transform: translateX(0);
  }
  50% {
    opacity: 0.8;
    transform: translateX(5px);
  }
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-20px) scale(0);
    opacity: 0;
  }
}

/* Responsive Process */
@media (max-width: 1024px) {
  .aca-process-flow-container {
    flex-direction: column;
    gap: 2rem;
  }

  .aca-flow-step,
  .aca-flow-center {
    width: 100%;
    flex-direction: column;
  }

  .aca-flow-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
  }

  .aca-flow-arrow i {
    transform: rotate(
      0
    ); /* Icon itself needs to point down if font-awesome arrow is right-facing */
  }

  @keyframes pulseArrow {
    0%,
    100% {
      opacity: 0.3;
      transform: rotate(90deg) translateY(0);
    }
    50% {
      opacity: 0.8;
      transform: rotate(90deg) translateY(5px);
    }
  }
}

/* Tags */
.aca-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.aca-tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--aca-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.2s;
}

.aca-tag:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

/* Info Box */
.aca-info-box {
  background: rgba(251, 191, 36, 0.1); /* Amber tint */
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: #d97706; /* Amber 600 */
  font-size: 0.95rem;
  margin-top: 1rem;
}

.dark-mode .aca-info-box {
  background: rgba(251, 191, 36, 0.05);
  color: #fbbf24; /* Amber 400 */
}

.aca-info-box i {
  margin-top: 0.2rem;
}

/* Lists */
.aca-premium-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aca-premium-list li {
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
  color: var(--aca-text-secondary);
}

.aca-premium-list li::before {
  content: "•";
  color: var(--aca-primary);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -0.2rem;
}

.aca-check-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.aca-check-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--aca-text-main);
}

.aca-check-list li i {
  color: var(--aca-success);
}

/* Grid Utilities */
.aca-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Mobile Responsiveness for Guide */
@media (max-width: 768px) {
  .aca-process-animation-container {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .aca-process-step {
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
  }

  .aca-process-line {
    width: 3px;
    height: 30px;
    margin: -5px 0 -5px 30px; /* Connects vertical dots */
    top: 0;
    flex: none;
  }

  .aca-process-line::after {
    width: 100%;
    height: 100%;
    transform: translateY(-100%);
    animation: flowLineVertical 3s infinite ease-in-out;
  }

  @keyframes flowLineVertical {
    0% {
      transform: translateY(-100%);
    }
    50% {
      transform: translateY(100%);
    }
    100% {
      transform: translateY(100%);
    }
  }

  .aca-guide-hero {
    padding: 2rem 1rem;
  }

  .aca-guide-hero h1 {
    font-size: 1.8rem !important;
  }

  /* Fix for Settings Modal on Mobile - Reduce height to avoid bottom menu */
  .aca-modal-content.aca-modal-lg {
    max-height: 60vh;
  }

  .aca-modal-footer {
    padding: 1rem;
  }
}
