:root {
  --primary-color: #4a6cf7;
  --primary-hover: #3a57e8;
  --secondary-color: #6c757d;
  --success-color: #24b47e;
  --danger-color: #e63757;
  --warning-color: #f6c343;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --body-bg-light: #f5f8fa;
  --body-bg-dark: #121212;
  --card-bg-light: #ffffff;
  --card-bg-dark: #1e1e1e;
  --border-light: #e9ecef;
  --border-dark: #2d2d2d;
}

/* Light Theme */
body {
  background-color: var(--body-bg-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Theme */
[data-bs-theme="dark"] body {
  background-color: var(--body-bg-dark);
}

/* Common Styles */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.btn {
  border-radius: 0.375rem;
  text-transform: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Material Icons */
.material-symbols-outlined {
  vertical-align: middle;
  line-height: 1;
  font-size: 1.25rem;
}

/* Form Styles */
.form-control,
.form-select {
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  border-color: var(--border-dark);
  background-color: var(--dark-color);
  color: var(--light-color);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(74, 108, 247, 0.25);
}

/* Form Builder Styles */
.form-builder-container {
  display: flex;
  gap: 2rem;
}

.form-elements-panel {
  width: 250px;
  background-color: var(--card-bg-light);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

[data-bs-theme="dark"] .form-elements-panel {
  background-color: var(--card-bg-dark);
}

.form-canvas {
  flex: 1;
  min-height: 500px;
  min-width: 600px;
  background-color: var(--card-bg-light);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

[data-bs-theme="dark"] .form-canvas {
  background-color: var(--card-bg-dark);
}

.form-element {
  background-color: var(--light-color);
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  cursor: grab;
  transition: all 0.2s ease;
  cursor: grab;
  user-select: none;
}

[data-bs-theme="dark"] .form-element {
  background-color: var(--dark-color);
  border-color: var(--border-dark);
}

.form-element:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.form-element:active {
  cursor: grabbing;
}

.form-element-wrapper {
  position: relative;
  background-color: var(--card-bg-light);
  transition: all 0.2s ease;
  margin-bottom: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.2s ease;
}

[data-bs-theme="dark"] .form-element-wrapper {
  background-color: var(--card-bg-dark);
  border-color: var(--border-dark);
}

.form-element-wrapper:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 450px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  margin-bottom: 1rem;
  display: inline-block;
}

/* Dashboard */
.stats-card {
  border-radius: 0.5rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  min-height: 140px;
}

.stats-icon {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 3rem;
  opacity: 0.2;
}

.stats-value {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stats-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Admin Pages */
.user-table th,
.user-table td {
  vertical-align: middle;
}

.user-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.user-status.active {
  background-color: var(--success-color);
}

.user-status.disabled {
  background-color: var(--danger-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-builder-container {
    flex-direction: column;
  }

  .form-elements-panel {
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .stats-card {
    min-height: 120px;
  }
}

/* Add styles for drag and drop functionality */

/* Add these styles at the end of the file */

/* Improved drag and drop styles */
.form-element-wrapper.dragging {
  opacity: 0.5;
  border: 2px dashed #4a6cf7 !important;
  background-color: rgba(74, 108, 247, 0.05);
  position: relative;
  z-index: 1000;
}

.drop-indicator {
  height: 0;
  background-color: transparent;
  margin: 0;
  transition: height 0.2s, background-color 0.2s;
  border-radius: 3px;
}

.drop-indicator.active {
  height: 6px;
  background-color: #4a6cf7;
  margin: 8px 0;
}

.form-canvas.drag-over {
  border: 2px dashed #4a6cf7;
  background-color: rgba(74, 108, 247, 0.05);
}

.form-element-wrapper {
  cursor: default;
}

.form-element-wrapper .drag-handle {
  cursor: grab;
  color: #6c757d;
  margin-right: 8px;
}

.form-element-wrapper .drag-handle:hover {
  color: #4a6cf7;
}

.form-element-wrapper .drag-handle:active {
  cursor: grabbing;
}
