/* Job Description Input Styles */
.job-input-tabs {
  display: flex;
  background: var(--bs-gray-100);
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--bs-gray-300);
  border-bottom: none;
  overflow: hidden;
  margin-bottom: 0;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--bs-gray-600);
  font-weight: 500;
  position: relative;
}

.tab-btn:hover {
  background: rgba(10, 40, 66, 0.05);
  color: var(--bs-primary);
}

.tab-btn.active {
  background: var(--bs-white);
  color: var(--bs-primary);
  border-bottom: 2px solid var(--bs-primary);
}

.tab-btn .tab-icon {
  font-size: 16px;
}

.job-input-content {
  border: 1px solid var(--bs-gray-300);
  border-radius: 0 0 8px 8px;
  background: var(--bs-white);
  padding: 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.job-input-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bs-gray-200);
  display: flex;
  justify-content: center;
}

.job-status-messages {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid var(--bs-info);
  background: var(--bs-light);
}

.job-status-messages.success {
  border-left-color: var(--bs-success);
  background: rgba(25, 135, 84, 0.1);
}

.job-status-messages.error {
  border-left-color: var(--bs-danger);
  background: rgba(220, 53, 69, 0.1);
}

.job-status-messages.processing {
  border-left-color: var(--bs-warning);
  background: rgba(255, 193, 7, 0.1);
}

.job-status-messages.retry {
  border-left-color: var(--bs-info);
  background: rgba(13, 110, 253, 0.1);
}

.job-status-messages.waiting {
  border-left-color: var(--bs-secondary);
  background: rgba(108, 117, 125, 0.1);
}

/* Bottom lead access container styling */
.bottom-lead-access {
  margin-top: 30px;
  border-top: 2px solid var(--bs-gray-200);
  padding-top: 20px;
}

.status-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.status-text {
  flex: 1;
  font-size: 14px;
  color: var(--bs-gray-700);
}

.section-subtitle {
  color: var(--bs-gray-600);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-icon {
  margin-right: 6px;
}

/* File input styling */
input[type="file"] {
  width: 100%;
  padding: 8px 12px;
  border: 2px dashed var(--bs-gray-300);
  border-radius: 8px;
  background: var(--bs-gray-50);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* URL input styling - full width with padding */
#jobUrl {
  width: 100% !important;
  box-sizing: border-box;
  padding: 12px 16px !important;
}

/* Text area styling - full width with padding */
#jobText {
  width: 100% !important;
  box-sizing: border-box;
  padding: 12px 16px !important;
}

input[type="file"]:hover {
  border-color: var(--bs-primary);
  background: rgba(10, 40, 66, 0.02);
}

input[type="file"]:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(10, 40, 66, 0.25);
}

/* Responsive design for tabs */
@media (max-width: 576px) {
  .tab-btn {
    padding: 10px 8px;
    font-size: 12px;
  }

  .tab-btn .tab-icon {
    font-size: 14px;
  }

  .job-input-content {
    padding: 16px;
  }
}

/* CSS Variables - BAP.hu Style */
:root {
  --bs-blue: #0d6efd;
  --bs-indigo: #6610f2;
  --bs-purple: #6f42c1;
  --bs-pink: #d63384;
  --bs-red: #dc3545;
  --bs-orange: #fd7e14;
  --bs-yellow: #ffc107;
  --bs-green: #198754;
  --bs-teal: #20c997;
  --bs-cyan: #0dcaf0;
  --bs-white: #fff;
  --bs-gray: #6c757d;
  --bs-gray-dark: #343a40;
  --bs-gray-100: #f8f9fa;
  --bs-gray-200: #e9ecef;
  --bs-gray-300: #dee2e6;
  --bs-gray-400: #ced4da;
  --bs-gray-500: #adb5bd;
  --bs-gray-600: #6c757d;
  --bs-gray-700: #495057;
  --bs-gray-800: #343a40;
  --bs-gray-900: #212529;
  --bs-primary: #0a2842;
  --bs-secondary: #6c757d;
  --bs-success: #198754;
  --bs-info: #0dcaf0;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-body-font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: #000000;
  --bs-body-bg: #ffffff;
}

/* Navigation Bar */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--bs-gray-200);
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.nav-container {
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 16px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-text {
  color: var(--bs-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Import DM Sans Font */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--bs-body-font-family);
  background: var(--bs-gray-300);
  min-height: 100vh;
  color: var(--bs-body-color);
  line-height: 1.5;
  font-weight: 400;
}

/* Main Container */
/* Main Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.main-container {
  background: var(--bs-gray-100);
  min-height: calc(100vh - 65px);
  padding: 40px 20px;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Header Section */
.header-section {
  padding: 35px 40px 30px;
  text-align: center;
  background: #ffffff;
}

.header-section h1 {
  color: var(--bs-primary);
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: var(--bs-body-font-family);
}

.subtitle {
  color: var(--bs-gray-600);
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0;
}

/* Welcome Section */
.welcome-section {
  padding: 0 40px 30px;
  background: #ffffff;
  animation: slideDown 0.4s ease;
}

.welcome-content {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
  position: relative;
}

.welcome-text {
  color: var(--bs-gray-700);
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 20px;
}

.welcome-text strong {
  color: var(--bs-primary);
  font-weight: 600;
}

.welcome-text a {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 500;
}

.welcome-text a:hover {
  text-decoration: underline;
}

.welcome-actions {
  text-align: center;
}

.btn-welcome-close {
  background: var(--bs-primary);
  color: white;
  padding: 10px 30px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.btn-welcome-close:hover {
  background: #083563;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Container - Now seamless */
#campaignForm {
  padding: 0 40px 40px;
  background: #ffffff;
}

/* Update animation */
@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }

  to {
    max-height: 500px;
    opacity: 1;
  }
}

/* Form Sections */
.form-section {
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--bs-gray-200);
}

.form-section:first-child {
  padding-top: 10px;
}

.form-section:last-of-type {
  border-bottom: none;
}

/* No Access Message */
.no-access-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bs-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.no-access-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--bs-gray-200);
}

.no-access-logo {
  height: 50px;
  margin-bottom: 30px;
}

.no-access-content h2 {
  color: var(--bs-primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.no-access-content p {
  color: var(--bs-gray-700);
  line-height: 1.6;
  margin-bottom: 15px;
}

.contact-info {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--bs-gray-200);
}

.contact-info a {
  color: var(--bs-primary);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Rating UI */
.rating-container {
  max-width: 560px;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.rating-stars-small {
  margin: 12px 0;
}

.rating-stars-small .rating-star {
  font-size: 36px;
}

.rating-star {
  font-size: 48px;
  cursor: pointer;
  color: #ddd;
  transition: color 0.2s, transform 0.1s;
  user-select: none;
  line-height: 1;
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rating-star:hover,
.rating-star.hover {
  color: #ffc107;
  transform: scale(1.1);
}

.rating-star.selected {
  color: #ffc107;
}

.rating-existing-info {
  color: var(--bs-gray-600);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.rating-modify-link,
.detailed-review-link {
  color: var(--bs-primary);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.rating-modify-link:hover,
.detailed-review-link:hover {
  text-decoration: underline;
}

.rating-confirmation {
  color: #28a745;
  font-size: 18px;
  font-weight: bold;
  margin: 15px 0;
}

#detailedReview {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: left;
}

#detailedReview h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--bs-primary);
}

#detailedReview textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

#detailedReview textarea:focus {
  border-color: #0a2842;
  outline: none;
  box-shadow: 0 0 0 2px rgba(10, 40, 66, 0.1);
}

.pub-preference {
  margin: 15px 0;
}

.pub-preference label {
  display: block;
  margin: 8px 0;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--bs-gray-700);
}

.pub-preference input[type="radio"] {
  margin-right: 8px;
}

#submitDetailedReview {
  background: #0a2842;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  width: 100%;
}

#submitDetailedReview:hover {
  opacity: 0.9;
}

#submitDetailedReview:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#detailedReviewToggle {
  margin-top: 10px;
}

.subtitle {
  color: var(--bs-gray-600);
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
}

/* Form Container */
.form-container {
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  padding: 35px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--bs-gray-200);
  border-top: none;
  margin-bottom: 40px;
}

/* Form Sections */
.form-section {
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--bs-gray-200);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h2 {
  color: var(--bs-dark);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 600;
  position: relative;
  padding-left: 15px;
  font-family: var(--bs-body-font-family);
}

.form-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--bs-primary);
  border-radius: 2px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--bs-gray-900);
  font-size: 0.95rem;
  font-family: var(--bs-body-font-family);
}

.form-group label.required::after {
  content: ' *';
  color: var(--bs-danger);
  font-weight: 500;
}

/* Form Controls */
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
  background: var(--bs-white);
  color: var(--bs-body-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

input[type="text"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
  border-color: var(--bs-gray-500);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
  background-color: var(--bs-white);
}

/* Validation Styles */
input:invalid:not(:focus):not(:placeholder-shown),
select:invalid:not(:focus):not(:placeholder-shown),
textarea:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--bs-danger);
}

input:valid:not(:focus):not(:placeholder-shown),
select:valid:not(:focus):not(:placeholder-shown),
textarea:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--bs-success);
}

/* Validation Messages */
.validation-messages {
  background: var(--bs-warning-rgb);
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--bs-warning);
  border-radius: 4px;
  padding: 20px;
  margin: 25px 0;
}

.validation-messages h3 {
  color: var(--bs-gray-900);
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--bs-body-font-family);
}

.validation-messages ul {
  list-style: none;
  padding: 0;
}

.validation-messages li {
  background: var(--bs-white);
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  border-left: 3px solid var(--bs-warning);
}

.validation-messages .field-name {
  font-weight: 600;
  color: var(--bs-gray-900);
  display: block;
  margin-bottom: 5px;
}

.validation-messages .suggestion-text {
  color: var(--bs-gray-700);
  font-size: 0.95rem;
}

/* Success Message */
.success-message {
  padding: 60px 40px;
  text-align: center;
  background: #ffffff;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: var(--bs-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 30px;
}

.success-message h3 {
  color: var(--bs-gray-900);
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 1.5rem;
}

.success-details {
  background: var(--bs-gray-100);
  border-radius: 8px;
  padding: 20px;
  margin: 20px auto;
  max-width: 500px;
}

/* Success Page Actions */
.success-actions {
  margin-top: 30px;
  text-align: center;
}

.success-actions .btn {
  display: inline-block;
  text-decoration: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
  background: var(--bs-primary);
  color: var(--bs-white);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.success-actions .btn:hover {
  background: #0257d5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
  color: var(--bs-white);
  text-decoration: none;
}

.success-actions .btn:active {
  transform: translateY(0);
}

.success-details p {
  margin: 5px 0;
  color: var(--bs-gray-700);
  font-size: 0.95rem;
}

/* Error Message */
.error-message {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid var(--bs-danger);
  border-radius: 4px;
  padding: 20px;
  margin: 25px 0;
}

.error-message h3 {
  color: var(--bs-danger);
  margin-bottom: 10px;
  font-weight: 600;
}

/* Buttons */
.form-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--bs-gray-200);
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* AI Analysis Skip Option Styles */
.ai-analysis-option {
  background: #f8f9fa;
  border: 1px solid var(--bs-gray-300);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.ai-analysis-option .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: var(--bs-gray-900);
}

.ai-analysis-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: var(--bs-primary);
}

.ai-analysis-option .checkbox-text {
  font-size: 0.95rem;
  user-select: none;
}

.ai-analysis-option .checkbox-hint {
  margin: 8px 0 0 28px;
  font-size: 0.85rem;
  color: var(--bs-gray-600);
  font-style: italic;
}

/* Adjust form actions layout when checkbox is visible */
.form-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--bs-gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.form-actions .btn-primary {
  margin-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-analysis-option {
    padding: 12px;
  }

  .ai-analysis-option .checkbox-hint {
    margin-left: 0;
    margin-top: 10px;
  }
}

.btn {
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bs-body-font-family);
}

.btn-primary {
  background: var(--bs-primary);
  color: var(--bs-white);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
  background: #0257d5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

/* Auto-save Indicator */
.autosave-indicator {
  margin-top: 15px;
  text-align: center;
  min-height: 20px;
}

.autosave-text {
  color: var(--bs-gray-600);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.autosave-text.saving {
  color: var(--bs-warning);
}

.autosave-text.saved {
  color: var(--bs-success);
}

.autosave-text.error {
  color: var(--bs-danger);
}

.autosave-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Loading Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--bs-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 10px;
}

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

/* Enhanced Validation and Suggestions Styles */
.suggestions-header {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bs-gray-100);
  border-radius: 4px;
}

.suggestions-header p {
  margin-bottom: 15px;
  color: var(--bs-gray-700);
  font-size: 1rem;
}

.suggestion-actions-all {
  display: flex;
  gap: 15px;
}

.btn-accept-all,
.btn-reject-all {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-family: var(--bs-body-font-family);
}

.btn-accept-all {
  background: var(--bs-success);
  color: var(--bs-white);
}

.btn-accept-all:hover {
  background: #146c43;
  transform: translateY(-1px);
}

.btn-reject-all {
  background: var(--bs-secondary);
  color: var(--bs-white);
}

.btn-reject-all:hover {
  background: #5c636a;
  transform: translateY(-1px);
}

/* Suggestion Item Styles */
.suggestion-item {
  background: var(--bs-white);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 4px;
  border: 1px solid var(--bs-gray-300);
  transition: all 0.2s ease;
}

.suggestion-item.severity-low {
  border-left: 4px solid var(--bs-info);
}

.suggestion-item.severity-medium {
  border-left: 4px solid var(--bs-warning);
}

.suggestion-item.severity-high {
  border-left: 4px solid var(--bs-danger);
}

.suggestion-item.accepted {
  background: rgba(25, 135, 84, 0.05);
  border-color: var(--bs-success);
  opacity: 0.9;
}

.suggestion-item.rejected {
  background: var(--bs-gray-100);
  border-color: var(--bs-gray-400);
  opacity: 0.7;
}

.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.severity-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bs-white);
}

.severity-badge.severity-low {
  background: var(--bs-info);
}

.severity-badge.severity-medium {
  background: var(--bs-warning);
  color: var(--bs-dark);
}

.severity-badge.severity-high {
  background: var(--bs-danger);
}

.suggestion-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.current-value,
.suggested-value {
  padding: 12px;
  background: var(--bs-gray-100);
  border-radius: 4px;
}

.suggested-value {
  background: rgba(13, 110, 253, 0.05);
  border: 1px solid rgba(13, 110, 253, 0.2);
}

.value-text {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--bs-gray-700);
  white-space: pre-wrap;
}

.value-text.suggested {
  color: var(--bs-dark);
  font-weight: 500;
}

.suggestion-reason {
  padding: 10px;
  background: rgba(255, 193, 7, 0.1);
  border-radius: 4px;
  margin-bottom: 15px;
  color: var(--bs-gray-800);
  font-size: 0.9rem;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.suggestion-actions {
  display: flex;
  gap: 10px;
}

.suggestion-actions button {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
}

.btn-accept {
  background: var(--bs-success);
  color: var(--bs-white);
}

.btn-accept:hover {
  background: #146c43;
}

.btn-preview {
  background: var(--bs-primary);
  color: var(--bs-white);
}

.btn-preview:hover {
  background: #0257d5;
}

.btn-reject {
  background: var(--bs-secondary);
  color: var(--bs-white);
}

.btn-reject:hover {
  background: #5c636a;
}

.status-accepted,
.status-rejected {
  font-weight: 600;
  font-size: 0.95rem;
}

.status-accepted {
  color: var(--bs-success);
}

.status-rejected {
  color: var(--bs-secondary);
}

/* Preview Modal Styles */
.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bs-white);
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

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

.modal-header {
  padding: 20px;
  background: var(--bs-primary);
  color: var(--bs-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--bs-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
}

.preview-section {
  margin-bottom: 25px;
}

.preview-section h4 {
  color: var(--bs-gray-800);
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

.preview-text {
  padding: 15px;
  background: var(--bs-gray-100);
  border-radius: 4px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.preview-text.current {
  background: rgba(220, 53, 69, 0.05);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.preview-text.suggested {
  background: rgba(13, 110, 253, 0.05);
  border: 1px solid rgba(13, 110, 253, 0.2);
}

.modal-footer {
  padding: 20px;
  background: var(--bs-gray-100);
  border-top: 1px solid var(--bs-gray-300);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-footer button {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
}

.modal-footer .btn-close {
  background: var(--bs-secondary);
  color: var(--bs-white);
}

.modal-footer .btn-close:hover {
  background: #5c636a;
}

/* Field Updated Animation */
.field-updated {
  animation: highlight 0.8s ease;
}

@keyframes highlight {
  0% {
    background-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.3);
  }

  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

/* Local Validation Error Styles */
.local-error {
  background: rgba(220, 53, 69, 0.1);
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  border-left: 3px solid var(--bs-danger);
}

.local-error .field-name {
  font-weight: 600;
  color: var(--bs-danger);
  display: block;
  margin-bottom: 5px;
}

.local-error .error-text {
  color: var(--bs-gray-800);
  font-size: 0.95rem;
}

/* Field Error State */
.field-error {
  border-color: var(--bs-danger) !important;
  background-color: rgba(220, 53, 69, 0.05);
}

/* Responsive Adjustments for Suggestions */
@media (max-width: 768px) {
  .suggestion-comparison {
    grid-template-columns: 1fr;
  }

  .suggestion-actions {
    flex-wrap: wrap;
  }

  .suggestion-actions button {
    flex: 1;
    min-width: 100px;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .form-container {
    padding: 25px;
  }

  .header-content h1 {
    font-size: 1.6rem;
  }

  .form-section h2 {
    font-size: 1.15rem;
  }

  input[type="text"],
  input[type="email"],
  select,
  textarea {
    padding: 8px 12px;
  }

  .suggestion-actions-all {
    flex-direction: column;
  }

  .btn-accept-all,
  .btn-reject-all {
    width: 100%;
  }
}

/* Placeholder Styles */
::placeholder {
  color: var(--bs-gray-500);
  opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bs-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--bs-gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bs-gray-500);
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Pulse animation for submit button */
@keyframes pulse {
  0% {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.6);
  }

  100% {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
  }
}

/* Ensure button is always clickable when not explicitly disabled */
.btn:not(:disabled) {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Print Styles */
@media print {
  body {
    background: var(--bs-white);
  }

  .form-actions,
  .suggestion-actions,
  .suggestion-actions-all {
    display: none;
  }

  header {
    border-top: none;
    box-shadow: none;
  }

  .form-container {
    box-shadow: none;
    border: none;
  }
}

/* Login Page Styles */
.login-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.login-container h2 {
  color: var(--bs-primary);
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.5rem;
  font-weight: 600;
}

.login-form {
  margin-top: 30px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
}

.form-input:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(10, 40, 66, 0.15);
}

.form-input:disabled {
  background: var(--bs-gray-100);
  cursor: not-allowed;
}

/* Dashboard Styles */
.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.nav-user span {
  color: var(--bs-gray-700);
  font-size: 0.9rem;
}

.btn-logout {
  padding: 6px 12px;
  background: var(--bs-secondary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--bs-gray-700);
}

.dashboard-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 25px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-header h1 {
  color: var(--bs-primary);
  font-size: 1.8rem;
  margin: 0;
}

.link-form {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin: 0 auto 30px auto;
  max-width: 1160px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--bs-gray-200);
}

.link-form h2 {
  color: var(--bs-dark);
  font-size: 1.3rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--bs-gray-200);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Dashboard form inputs consistency */
.link-form input[type="text"],
.link-form input[type="email"],
.link-form input[type="tel"],
.link-form input[type="url"],
.link-form input[type="number"],
.link-form select,
.link-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
  background: var(--bs-white);
  color: var(--bs-body-color);
}

.link-form input[type="text"]:focus,
.link-form input[type="email"]:focus,
.link-form input[type="tel"]:focus,
.link-form input[type="url"]:focus,
.link-form input[type="number"]:focus,
.link-form select:focus,
.link-form textarea:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(10, 40, 66, 0.15);
}

.generated-link {
  background: var(--bs-gray-100);
  border-radius: 8px;
  padding: 25px;
  margin-top: 25px;
}

.generated-link h3 {
  color: var(--bs-success);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.link-display {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.link-display input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

.btn-copy {
  padding: 10px 20px;
  background: var(--bs-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: #083563;
}

.link-instructions {
  color: var(--bs-gray-700);
  font-size: 0.9rem;
  margin: 0;
}

.links-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--bs-gray-200);
  max-width: 900px;
  margin: 0 auto;
}

.links-section h2 {
  color: var(--bs-dark);
  font-size: 1.3rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  padding-top: 15px;
  border-bottom: 1px solid var(--bs-gray-200);
}

.links-list {
  display: grid;
  gap: 20px;
}

.link-item {
  background: var(--bs-gray-100);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--bs-gray-200);
  transition: all 0.2s ease;
}

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

.link-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bs-gray-300);
}

.link-date {
  color: var(--bs-gray-600);
  font-size: 0.85rem;
}

.link-details p {
  margin: 5px 0;
  color: var(--bs-gray-700);
  font-size: 0.9rem;
}

.link-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Sync Status Styles */
.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 8px;
  background: var(--bs-gray-100);
  border-radius: 4px;
  font-size: 0.85rem;
}

.sync-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sync-status.sync-success .status-dot {
  background: var(--bs-success);
}

.sync-status.sync-warning .status-dot {
  background: var(--bs-warning);
}

.sync-status.sync-error .status-dot {
  background: var(--bs-danger);
}

.sync-text {
  color: var(--bs-gray-700);
}

.btn-small {
  padding: 6px 12px;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-small.btn-primary {
  background: var(--bs-primary);
}

.btn-small.btn-primary:hover {
  background: #083563;
}

.btn-small.btn-secondary {
  background: var(--bs-secondary);
}

.btn-small.btn-secondary:hover {
  background: #5c636a;
}

.btn-small.btn-success {
  background: var(--bs-success);
}

.btn-small.btn-success:hover {
  background: #146c43;
}

.btn-small.btn-info {
  background: var(--bs-info);
}

.btn-small.btn-info:hover {
  background: #0bacdc;
}

.btn-small.btn-danger {
  background: var(--bs-danger);
}

.btn-small.btn-danger:hover {
  background: #b02a37;
}

.btn-secondary {
  background: var(--bs-secondary);
  color: white;
}

.no-links {
  text-align: center;
  color: var(--bs-gray-600);
  padding: 40px;
  font-style: italic;
}

.loading {
  text-align: center;
  color: var(--bs-gray-600);
  padding: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 15px;
  }

  .nav-user {
    flex-direction: column;
    gap: 5px;
  }

  .link-display {
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .email-input-group {
    flex-direction: column;
  }

  .btn-add-email {
    width: 100%;
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Submission Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-container {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 25px 30px;
  background: var(--bs-primary);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.submission-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--bs-gray-200);
}

.submission-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.submission-section h3 {
  color: var(--bs-primary);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.honeypot-section {
  background: #fff9e6;
  padding: 25px;
  border-radius: 8px;
  border: 2px solid #ffd666;
}

.honeypot-section h3 {
  color: #d48806;
}

.metadata-section {
  background: var(--bs-gray-100);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--bs-gray-300);
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  font-weight: 600;
  color: var(--bs-gray-800);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.field-value {
  background: white;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--bs-gray-300);
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
  color: var(--bs-gray-700);
}

.honeypot-section .field-value {
  background: rgba(255, 255, 255, 0.8);
  border-color: #ffd666;
}

.modal-footer {
  padding: 20px 30px;
  background: var(--bs-gray-100);
  border-top: 1px solid var(--bs-gray-300);
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
}

.close-modal-btn {
  padding: 10px 24px;
  background: var(--bs-secondary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-modal-btn:hover {
  background: var(--bs-gray-700);
  transform: translateY(-1px);
}

/* Modal animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   EDIT LINK MODAL - Styled & Compact
   ============================================ */
.edit-link-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
  overflow-y: auto;
  overflow-x: hidden;
}

.edit-link-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: 20px 0;
}

.edit-link-content h3 {
  padding: 20px 24px;
  margin: 0;
  background: linear-gradient(135deg, #0a2842 0%, #1a4a6b 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  font-size: 1.3rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Scrollable form */
.edit-link-content form {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 20px 24px 0 24px;
}

/* Compact form sections in edit modal */
.edit-link-content .form-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.edit-link-content .form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 20px;
}

.edit-link-content .form-section label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #0a2842;
  font-size: 0.9rem;
}

.edit-link-content .form-section input,
.edit-link-content .form-section select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.edit-link-content .form-section input:focus,
.edit-link-content .form-section select:focus {
  border-color: #0a2842;
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 40, 66, 0.1);
}

/* Checkboxes must not inherit the full-width text-input sizing above —
   keep them at their natural size and tight against their label. */
.edit-link-content .form-section input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

/* Contact items - compact */
.edit-link-content .contact-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #e9ecef;
}

.edit-link-content .contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.edit-link-content .contact-fields input {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.edit-link-content .bap-email-item {
  background: #f8f9fa;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-link-content .bap-email {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* Add buttons - compact */
.edit-link-content .btn-add-contact,
.edit-link-content .btn-add-bap-email {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  border: 2px dashed #ced4da;
  background: white;
  color: #6c757d;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.edit-link-content .btn-add-contact:hover,
.edit-link-content .btn-add-bap-email:hover {
  border-color: #0a2842;
  color: #0a2842;
  background: #f8f9fa;
}

/* Remove buttons */
.edit-link-content .btn-remove-contact,
.edit-link-content .btn-remove-bap-email {
  padding: 4px 8px;
  font-size: 0.8rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-link-content .btn-remove-contact:hover,
.edit-link-content .btn-remove-bap-email:hover {
  background: #c82333;
  transform: scale(1.05);
}

/* Sticky footer with styled buttons */
.edit-modal-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, white 0%, white 85%, rgba(255, 255, 255, 0.95) 100%);
  padding: 16px 24px;
  border-top: 2px solid #e9ecef;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
  margin: 0 !important;
  flex-shrink: 0;
}

/* Styled cancel button */
.edit-link-content #editCancelBtn {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #6c757d;
  background: white;
  color: #6c757d;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-link-content #editCancelBtn:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Styled save button */
.edit-link-content #editSaveBtn {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: linear-gradient(135deg, #0a2842 0%, #1a4a6b 100%);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(10, 40, 66, 0.3);
  position: relative;
  overflow: hidden;
}

.edit-link-content #editSaveBtn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.edit-link-content #editSaveBtn:hover {
  background: linear-gradient(135deg, #1a4a6b 0%, #2a5a7b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 40, 66, 0.4);
}

.edit-link-content #editSaveBtn:active::after {
  width: 300px;
  height: 300px;
}

.edit-link-content #editSaveBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .edit-link-content {
    width: 95%;
    max-height: 95vh;
  }

  .edit-link-content h3 {
    padding: 16px 20px;
    font-size: 1.1rem;
  }

  .edit-link-content form {
    padding: 16px 20px 0 20px;
  }

  .edit-link-content .contact-fields {
    grid-template-columns: 1fr;
  }

  .edit-modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }

  .edit-link-content #editCancelBtn,
  .edit-link-content #editSaveBtn {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }
}

/* Email List Styles */
.email-list-container {
  background: var(--bs-gray-100);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--bs-gray-300);
}

.email-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.email-list-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: var(--bs-body-font-family);
  background: var(--bs-white);
  color: var(--bs-body-color);
}

.email-list-input:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(10, 40, 66, 0.15);
}

.btn-add-email {
  padding: 10px 20px;
  background: var(--bs-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  font-family: var(--bs-body-font-family);
  font-size: 0.95rem;
}

.btn-add-email:hover {
  background: #083563;
  transform: translateY(-1px);
}

.email-list-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.email-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f8f9fa;
  border: 1px solid var(--bs-gray-400);
  border-radius: 20px;
  font-size: 0.9rem;
}

.email-remove {
  background: none;
  border: none;
  color: var(--bs-danger);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.email-remove:hover {
  background: var(--bs-danger);
  color: white;
  border-radius: 50%;
}

.form-hint {
  display: block;
  margin-top: 5px;
  color: var(--bs-gray-600);
  font-size: 0.85rem;
  font-style: normal;
}

/* Progress Message Styles */
.progress-message {
  background: white;
  border: 2px solid var(--bs-primary);
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.progress-message.progress-ai {
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  border-color: var(--bs-info);
}

.progress-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--bs-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.progress-text {
  font-size: 1.1rem;
  color: var(--bs-dark);
  font-weight: 500;
  margin-bottom: 10px;
}

.progress-hint {
  font-size: 0.9rem;
  color: var(--bs-gray-600);
  margin-top: 10px;
  font-style: italic;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

/* Edit Status Styles */
.edit-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bs-gray-100);
  border-radius: 6px;
  margin-top: 10px;
}

.edit-status.status-active {
  background: rgba(25, 135, 84, 0.1);
  border: 1px solid var(--bs-success);
}

.edit-status.status-locked {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid var(--bs-danger);
}

.status-label {
  font-weight: 500;
  font-size: 0.9rem;
}

.status-active .status-label {
  color: var(--bs-success);
}

.status-locked .status-label {
  color: var(--bs-danger);
}

.btn-toggle-edit {
  padding: 4px 10px;
  background: white;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-edit:hover {
  background: var(--bs-gray-100);
  border-color: var(--bs-gray-600);
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 20px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

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

.toast-success {
  border-left: 4px solid var(--bs-success);
}

.toast-error {
  border-left: 4px solid var(--bs-danger);
}

.toast-info {
  border-left: 4px solid var(--bs-info);
}

/* Submission Status Message */
.submission-status-message {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.submission-status-message.read-only {
  background: rgba(220, 53, 69, 0.05);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.submission-status-message.editable {
  background: rgba(255, 193, 7, 0.05);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.status-content h3 {
  margin: 0 0 10px 0;
  color: var(--bs-dark);
  font-size: 1.1rem;
  font-weight: 600;
}

.status-content p {
  margin: 5px 0;
  color: var(--bs-gray-700);
  font-size: 0.95rem;
}

/* Read-only form styles */
input[disabled].read-only,
select[disabled].read-only,
textarea[disabled].read-only {
  background: var(--bs-gray-100);
  cursor: not-allowed;
  opacity: 0.8;
}

/* ADD THESE STYLES TO THE EXISTING STYLE TAG OR CREATE A NEW ONE */
.csv-import-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--bs-gray-200);
}

.csv-import-section h2 {
  color: var(--bs-dark);
  font-size: 1.3rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--bs-gray-200);
}

.file-upload-area {
  border: 2px dashed var(--bs-gray-400);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bs-gray-50);
}

.file-upload-area:hover {
  border-color: var(--bs-primary);
  background: var(--bs-gray-100);
}

.file-upload-area.dragging {
  border-color: var(--bs-primary);
  background: rgba(10, 40, 66, 0.05);
}

.upload-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.upload-prompt p {
  margin: 5px 0;
  color: var(--bs-gray-700);
}

.file-hint {
  font-size: 0.85rem;
  color: var(--bs-gray-600);
  font-style: italic;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: var(--bs-gray-200);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-fill {
  height: 100%;
  background: var(--bs-primary);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: var(--bs-gray-700);
  font-size: 0.95rem;
}

.leads-count-badge {
  background: var(--bs-success);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-left: 8px;
}

.btn-import-csv {
  background: var(--bs-info);
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-import-csv:hover {
  background: #0dcaf0;
  transform: translateY(-1px);
}

.btn-view-leads {
  background: var(--bs-success);
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 5px;
}

.btn-view-leads:hover {
  background: #146c43;
  transform: translateY(-1px);
}

/* Danger button style */
.btn-danger {
  background: var(--bs-danger);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #b02a37;
  transform: translateY(-1px);
}

/* Search input in dashboard */
#searchLinks {
  font-family: var(--bs-body-font-family);
  font-size: 0.95rem;
}

#searchLinks:focus {
  outline: none;
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(10, 40, 66, 0.15);
}

/* Archive status indicator */
.link-item.archived {
  opacity: 0.7;
  background: var(--bs-gray-200);
}

.link-item.archived .link-header {
  position: relative;
}

.link-item.archived .link-header::after {
  content: '📦 Archivált';
  position: absolute;
  top: 0;
  right: 100px;
  background: var(--bs-warning);
  color: var(--bs-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Toast warning style */
.toast-warning {
  border-left-color: var(--bs-warning) !important;
}

/* Lead Access Button Styles */
.lead-access-container {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 20px 0;
  text-align: center;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
  animation: slideDown 0.5s ease;
}

.lead-access-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: white;
  color: #28a745;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.lead-access-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: #20c997;
  text-decoration: none;
}

.lead-count-badge {
  background: #dc3545;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  position: absolute;
  top: -10px;
  right: -10px;
  min-width: 30px;
  text-align: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

.lead-access-icon {
  font-size: 1.5rem;
}

.lead-access-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lead-access-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.lead-access-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  font-weight: 400;
}

.import-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 10px;
  font-weight: 500;
}

.import-status-badge.status-processing {
  background: #fff3cd;
  color: #856404;
  animation: pulse 1.5s infinite;
}

.import-status-badge.status-complete {
  background: #d4edda;
  color: #155724;
}

.import-status-badge.status-failed {
  background: #f8d7da;
  color: #721c24;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

/* Token Status Indicator */
.token-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 20px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  color: white;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.status-good {
  background: #28a745;
}

.status-dot.status-warning {
  background: #ffc107;
}

.status-dot.status-critical {
  background: #dc3545;
  animation: pulse 1s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Token Alert */
.token-alert {
  padding: 12px 20px;
  margin: 15px 0;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.token-alert-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
}

.token-alert-critical {
  background: #f8d7da;
  border: 1px solid #dc3545;
  color: #721c24;
  font-weight: 600;
}

.token-alert button {
  margin-left: 15px;
}

/* File Upload Styles */
.optional-label {
  font-weight: normal;
  color: var(--bs-gray-600);
  font-size: 0.9em;
}

.section-description {
  color: var(--bs-gray-600);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.file-upload-container {
  border: 2px dashed var(--bs-gray-400);
  border-radius: 8px;
  padding: 20px;
  background: var(--bs-gray-50);
  transition: all 0.3s ease;
}

.file-upload-container:hover {
  border-color: var(--bs-primary);
  background: var(--bs-gray-100);
}

.file-upload-container.dragover {
  border-color: var(--bs-primary);
  background: rgba(10, 40, 66, 0.05);
  border-style: solid;
}

.file-upload-container input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--bs-gray-300);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
}

.file-upload-info {
  margin-top: 15px;
}

.upload-constraints {
  background: white;
  border: 1px solid var(--bs-gray-300);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

.upload-constraints strong {
  color: var(--bs-dark);
  display: block;
  margin-bottom: 8px;
}

.upload-constraints ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.upload-constraints li {
  color: var(--bs-gray-700);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.file-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--bs-gray-300);
}

.preview-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--bs-gray-300);
  border-radius: 4px;
  background: var(--bs-gray-50);
}

.preview-image {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.preview-info {
  text-align: center;
  font-size: 0.8rem;
  color: var(--bs-gray-600);
}

.preview-name {
  font-weight: 500;
  margin-bottom: 4px;
  word-break: break-word;
  max-width: 100%;
}

.preview-size {
  color: var(--bs-gray-500);
}

.preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.preview-remove:hover {
  background: #c82333;
}

.upload-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 12px;
  font-size: 0.9rem;
  margin-top: 10px;
}

.upload-error ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.upload-error li {
  margin-bottom: 4px;
}

/* Required field with empty value styling */
input.required-empty,
select.required-empty,
textarea.required-empty {
  background-color: rgba(220, 53, 69, 0.1) !important;
  border-color: var(--bs-danger) !important;
}

/* Responsive adjustments for file upload */
@media (max-width: 768px) {
  .file-preview {
    grid-template-columns: 1fr;
  }

  .upload-constraints ul {
    padding-left: 16px;
  }
}