/* Alert Modal Styles */
.alert-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  animation: modalFadeIn 0.3s ease forwards;
}

.alert-modal-content {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow: hidden;
  transform: translateY(30px) scale(0.9);
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

@keyframes alertModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal Header */
.alert-modal-header {
  padding: 24px 28px 20px;
  background: linear-gradient(135deg, #1D3557 0%, #2d4a70 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.alert-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.alert-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  font-weight: 300;
}

.alert-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.05);
}

/* Modal Body Enhanced */
.alert-modal-body {
  padding: 32px 28px;
  background: #ffffff;
  max-height: 60vh;
  overflow-y: auto;
}

.alert-modal-body::-webkit-scrollbar {
  width: 6px;
}

.alert-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.alert-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.alert-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Form Styles */
.alert-form-group {
  margin-bottom: 24px;
}

.alert-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: #f8f9fa;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #1D3557;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.1);
  transform: translateY(-1px);
}

.form-control:read-only {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.form-control::placeholder {
  color: #adb5bd;
  font-weight: 400;
}

.alert-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.current-price-display {
  margin-top: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
  border-radius: 8px;
  border-left: 4px solid #28a745;
}

.current-price-display small {
  color: #155724;
  font-weight: 600;
  font-size: 13px;
}

/* Conditional Fields */
.alert-conditional-fields {
  margin-top: 16px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.metric-description {
  margin-top: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}

.metric-description small {
  color: #0d47a1;
  font-weight: 500;
  font-size: 13px;
}

/* Checkbox Styling */
.alert-checkbox-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.alert-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 120px;
}

.alert-checkbox-label:hover {
  border-color: #1D3557;
  background: #f8f9fa;
}

.alert-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.alert-checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #1D3557;
}

.checkmark {
  display: none; /* Hide custom checkmark for now, use native */
}

/* Expiry Info */
.alert-expiry-info {
  margin-top: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
  border: 1px solid #ffcc02;
  border-radius: 12px;
  text-align: center;
}

.alert-expiry-info small {
  color: #e65100;
  font-weight: 600;
  font-size: 13px;
}

.alert-symbol-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  color: #2c3e50;
  font-weight: 600;
}

.alert-symbol-info p {
  margin: 0;
  color: #6c757d;
  font-size: 0.95rem;
}

.alert-type-selector {
  margin-bottom: 24px;
}

.alert-type-selector h4 {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 1rem;
}

.alert-type-buttons {
  display: flex;
  gap: 8px;
}

.alert-type-btn {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-type-btn:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

.alert-type-btn.active {
  border-color: #007bff;
  background: #007bff;
  color: white;
}

.alert-options {
  margin-bottom: 20px;
}

.alert-condition {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.alert-condition label {
  font-weight: 500;
  color: #495057;
  min-width: 120px;
}

.alert-condition select,
.alert-condition input {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.alert-condition select:focus,
.alert-condition input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.alert-condition input[type="number"] {
  width: 120px;
}

.alert-quick-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-alert-btn {
  padding: 8px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.quick-alert-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.metric-details {
  padding: 12px;
  background: #e8f4fd;
  border-radius: 6px;
  margin-top: 12px;
}

.metric-details p {
  margin: 0;
  font-size: 0.85rem;
  color: #0c5aa6;
}

.notification-options {
  margin-bottom: 20px;
}

.notification-options h4 {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 1rem;
}

.notification-checkboxes {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.notification-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #495057;
}

.notification-checkboxes input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Modal Footer */
.alert-modal-footer {
  padding: 24px 28px 28px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.alert-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto; /* Prevent flex growth */
}

.alert-btn-primary {
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.alert-btn-primary:hover {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.alert-btn-secondary {
  background: #ffffff;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.alert-btn-secondary:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  color: #495057;
}

.create-alert-btn {
  padding: 12px 24px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.create-alert-btn:hover {
  background: #218838;
}

.cancel-alert-btn {
  padding: 12px 24px;
  background: transparent;
  color: #6c757d;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.cancel-alert-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* Success Toast */
.alert-success-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #28a745;
  z-index: 10001;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease-out;
  max-width: 400px;
}

.alert-success-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
}

.toast-message strong {
  color: #28a745;
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .alert-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .alert-condition {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .alert-condition label {
    min-width: auto;
  }
  
  .alert-modal-footer {
    flex-direction: column;
  }
  
  .create-alert-btn,
  .cancel-alert-btn {
    width: 100%;
  }
  
  .alert-success-toast {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .alert-modal-content {
    background: #2c3e50;
    color: white;
  }
  
  .alert-modal-header {
    border-bottom-color: #495057;
  }
  
  .alert-modal-header h2 {
    color: white;
  }
  
  .alert-symbol-info {
    background: #34495e;
  }
  
  .alert-symbol-info h3 {
    color: white;
  }
  
  .alert-type-btn {
    background: #34495e;
    border-color: #495057;
    color: white;
  }
  
  .alert-condition select,
  .alert-condition input {
    background: #34495e;
    border-color: #495057;
    color: white;
  }
  
  .quick-alert-btn {
    background: #34495e;
    border-color: #495057;
    color: white;
  }
  
  .alert-success-toast {
    background: #2c3e50;
    color: white;
  }
}

/* Additional Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: translateY(30px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Alert Details Modal Specific Styling */
.alert-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.detail-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

.detail-section h4 {
  margin: 0 0 16px 0;
  color: #1D3557;
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #E63946;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-row label {
  font-weight: 600;
  color: #495057;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 0 0 40%;
}

.detail-row span {
  color: #1D3557;
  font-weight: 500;
  text-align: right;
  flex: 1;
}

.symbol-highlight {
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.symbol-pill {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.alert-status.status-active {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.alert-status.status-inactive {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f1b0b7;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Enhanced Delete Confirmation Modal Styling */
.delete-modal-content {
  border: 2px solid #dc3545;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.delete-modal-header {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  text-align: center;
  position: relative;
  padding: 32px 28px 24px;
}

.delete-icon-wrapper {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
  border: 3px solid #dc3545;
}

.delete-warning-icon {
  font-size: 28px;
  animation: pulse 2s infinite;
}

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

.delete-modal-header h2 {
  margin: 20px 0 0 0;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.delete-modal-body {
  padding: 40px 32px 32px;
  text-align: center;
}

.delete-warning-message h3 {
  color: #1D3557;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.warning-text {
  color: #6c757d;
  font-size: 16px;
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.delete-alert-summary {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #ffcc02;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0 32px 0;
  position: relative;
}

.delete-alert-summary::before {
  content: '🎯';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid #ffcc02;
}

.delete-alert-preview {
  background: transparent;
  border: none;
  padding: 0;
  margin: 20px 0 0 0;
  text-align: center;
  font-family: 'Courier New', monospace;
}

.delete-alert-preview strong {
  color: #dc3545;
  font-size: 24px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.delete-consequences {
  text-align: left;
  margin-top: 24px;
}

.consequence-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #dc3545;
  transition: all 0.2s ease;
}

.consequence-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.consequence-icon {
  font-size: 20px;
  min-width: 24px;
}

.consequence-text {
  color: #495057;
  font-weight: 500;
  font-size: 14px;
}

.delete-modal-footer {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 24px 32px 32px;
  border-top: 1px solid #dee2e6;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.cancel-delete-btn,
.confirm-delete-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 160px;
  justify-content: center;
}

.cancel-delete-btn {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  border: 2px solid #6c757d;
}

.cancel-delete-btn:hover {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.confirm-delete-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: 2px solid #dc3545;
  position: relative;
  overflow: hidden;
}

.confirm-delete-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.confirm-delete-btn:hover::before {
  left: 100%;
}

.confirm-delete-btn:hover {
  background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-icon {
  font-size: 18px;
}

.btn-text {
  font-weight: 700;
}

/* Mobile Responsive for Delete Modal */
@media (max-width: 768px) {
  .delete-modal-body {
    padding: 32px 24px 24px;
  }
  
  .delete-modal-footer {
    padding: 20px 20px 24px;
    flex-direction: column;
  }
  
  .cancel-delete-btn,
  .confirm-delete-btn {
    width: 100%;
    min-width: auto;
  }
  
  .delete-consequences {
    margin-top: 20px;
  }
  
  .consequence-item {
    padding: 10px 16px;
    margin: 6px 0;
  }
  
  .consequence-text {
    font-size: 13px;
  }
}

/* Enhanced Modal Buttons */
.create-alert-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.create-alert-btn:hover {
  background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.delete-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.delete-btn:hover {
  background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Alert Details Loading State */
.alert-details-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #6c757d;
}

.alert-details-loading .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #E63946;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.alert-details-loading p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* Enhanced Modal Footer Buttons */
.alert-modal-footer .alert-btn {
  min-width: 120px;
  justify-content: center;
}

/* Mobile Responsive for Alert Details */
@media (max-width: 768px) {
  .alert-details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .detail-section {
    padding: 16px;
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-row label {
    flex: none;
  }
  
  .detail-row span {
    text-align: left;
  }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .alert-details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .detail-section {
    padding: 16px;
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-row label {
    flex: none;
  }
  
  .detail-row span {
    text-align: left;
  }
}
  .alert-modal-content {
    width: 95%;
    margin: 20px;
    max-height: 85vh;
  }
  
  .alert-modal-header {
    padding: 20px 24px 16px;
  }
  
  .alert-modal-header h3 {
    font-size: 18px;
  }
  
  .alert-modal-body {
    padding: 24px 20px;
  }
  
  .alert-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .alert-checkbox-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .alert-modal-footer {
    padding: 20px 20px 24px;
    flex-direction: row; /* Keep buttons side by side */
    justify-content: space-between;
  }
  
  .alert-btn {
    flex: 1;
    max-width: 48%;
    justify-content: center;
  }


@media (max-width: 480px) {
  .alert-modal {
    align-items: flex-start;
    padding: 0;
  }
  
  .alert-modal-content {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    max-height: 100vh;
    overflow-y: auto;
  }
  
  .alert-modal-header {
    padding: 16px 20px;
  }
  
  .alert-modal-body {
    padding: 20px 16px;
  }
  
  .alert-modal-footer {
    padding: 16px 16px 20px;
  }
  
  .alert-form-group label {
    font-size: 13px;
  }
  
  .form-control {
    padding: 12px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* ============================================ */
/* ALERTS PAGE SPECIFIC STYLES */
/* ============================================ */

.alert-stats {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  padding: 0 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  flex: 0 1 auto;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

.stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 4px 0;
  color: #1D3557;
  letter-spacing: -1px;
}

.stat-info p {
  font-size: 11px;
  color: #6c757d;
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 30px 0;
  flex-wrap: wrap;
  padding: 0 20px;
}

.filter-btn {
  padding: 12px 24px;
  border: 2px solid #e9ecef;
  background: #ffffff;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #6c757d;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-btn:hover {
  border-color: #E63946;
  color: #E63946;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
  border-color: #E63946;
  color: white;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.alerts-table-wrapper {
  margin: 30px 20px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.alerts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.alerts-table thead {
  background: linear-gradient(135deg, #1D3557 0%, #2d4a70 100%);
  color: white;
}

.alerts-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
}

.alerts-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f1f3f5;
  vertical-align: middle;
}

.alerts-table tbody tr {
  transition: all 0.2s ease;
}

.alerts-table tbody tr:hover {
  background: #f8f9fa;
}

.alerts-table tbody tr:last-child td {
  border-bottom: none;
}

.alert-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-status.active {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-status.triggered {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-status.paused {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f1b0b7;
}

/* Alert Type Styling */
.alert-type-badge {
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.alert-type-badge.price {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.alert-type-badge.metric {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.alert-type-badge.volume {
  background: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
}

/* Enhanced Table Cell Styling */
.symbol-cell {
  font-weight: 600;
  color: #1D3557;
  font-size: 15px;
}

.type-cell {
  min-width: 120px;
}

.condition-cell {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #495057;
}

.status-cell {
  min-width: 110px;
}

.date-cell {
  font-size: 12px;
  color: #6c757d;
  min-width: 90px;
}

.triggered-cell {
  min-width: 120px;
}

.triggered-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trigger-count {
  font-weight: 600;
  color: #E63946;
  font-size: 12px;
}

.last-triggered {
  font-size: 10px;
  color: #6c757d;
}

.actions-cell {
  min-width: 120px;
}

.alert-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.action-btn.view-btn:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #90caf9;
}

.action-btn.toggle-btn:hover {
  background: #fff3e0;
  color: #f57c00;
  border-color: #ffcc02;
}

.action-btn.delete-btn:hover {
  background: #ffebee;
  color: #d32f2f;
  border-color: #ffcdd2;
}

/* Status Badge Enhancements */
.alert-status.status-active {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-status.status-inactive {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f1b0b7;
}

.alert-status.status-expired {
  background: #e2e3e5;
  color: #495057;
  border: 1px solid #ced4da;
}

.alert-status.status-expiring {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.alert-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.alert-action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.alert-action-btn.edit:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #90caf9;
}

.alert-action-btn.pause:hover {
  background: #fff3e0;
  color: #f57c00;
  border-color: #ffcc02;
}

.alert-action-btn.delete:hover {
  background: #ffebee;
  color: #d32f2f;
  border-color: #ffcdd2;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 16px;
  margin: 30px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 24px;
  color: #1D3557;
  margin: 20px 0 12px;
  font-weight: 600;
}

.empty-state p {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 30px;
  line-height: 1.5;
}

.create-first-alert-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.create-first-alert-btn:hover {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.alert-search-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px;
  flex-wrap: wrap;
}

.alert-search-controls select,
.alert-search-controls input {
  padding: 10px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  transition: all 0.3s ease;
}

.alert-search-controls select:focus,
.alert-search-controls input:focus {
  outline: none;
  border-color: #E63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.alert-control-btn {
  padding: 10px 20px;
  border: 2px solid #e9ecef;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: #6c757d;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-control-btn:hover {
  border-color: #E63946;
  color: #E63946;
}

.alert-control-btn.delete-all {
  color: #dc3545;
  border-color: #dc3545;
}

.alert-control-btn.delete-all:hover {
  background: #dc3545;
  color: white;
}

.alert-control-btn.new-alert {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-color: #28a745;
  color: white;
}

.alert-control-btn.new-alert:hover {
  background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Mobile Responsive for Alerts Page */
@media (max-width: 768px) {
  .alert-stats {
    flex-direction: column;
    padding: 0 16px;
    gap: 12px;
    align-items: center;
  }
  
  .stat-card {
    padding: 14px 18px;
    min-width: 120px;
    width: 100%;
    max-width: 200px;
  }
  
  .stat-icon {
    font-size: 20px;
    margin-bottom: 6px;
  }
  
  .stat-info h3 {
    font-size: 24px;
    margin: 2px 0;
  }
  
  .stat-info p {
    font-size: 10px;
  }
  
  .alert-filters {
    padding: 0 16px;
    gap: 8px;
  }
  
  .filter-btn {
    padding: 10px 16px;
    font-size: 12px;
  }
  
  .alerts-table-wrapper {
    margin: 20px 16px;
    overflow-x: auto;
  }
  
  .alerts-table {
    min-width: 600px;
  }
  
  .alerts-table th,
  .alerts-table td {
    padding: 12px 8px;
    font-size: 12px;
  }
  
  .empty-state {
    margin: 20px 16px;
    padding: 40px 16px;
  }
  
  .empty-icon {
    font-size: 48px;
  }
  
  .empty-state h3 {
    font-size: 20px;
  }
  
  .empty-state p {
    font-size: 14px;
  }
  
  .alert-search-controls {
    margin: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .alert-search-controls select,
  .alert-search-controls input,
  .alert-control-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .alert-stats {
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px 16px;
    min-width: 110px;
  }
  
  .stat-icon {
    font-size: 18px;
  }
  
  .stat-info h3 {
    font-size: 20px;
  }
  
  .stat-info p {
    font-size: 9px;
  }
}

/* Alert Navigation Active State */
.alert-nav-button.active {
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
  border-color: #E63946;
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.alert-nav-button.active .alert-icon-badge {
  background: #ffffff;
  color: #E63946;
  border-color: #ffffff;
}

/* Alert Details Modal Styling */
.alert-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.detail-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

.detail-section h4 {
  color: #1D3557;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f5;
}

.detail-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-row label {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  flex: 0 0 auto;
  margin-right: 16px;
}

.detail-row span {
  color: #1D3557;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  flex: 1;
}

.symbol-highlight {
  background: linear-gradient(135deg, #E63946 0%, #dc3545 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}

.delete-alert-preview {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  text-align: center;
  color: #495057;
}

.delete-alert-preview strong {
  color: #E63946;
  font-size: 16px;
}

/* Mobile responsive for alert details */
@media (max-width: 768px) {
  .alert-details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .detail-section {
    padding: 16px;
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-row label {
    margin-right: 0;
  }
  
  .detail-row span {
    text-align: left;
  }
}
