/* Modern CRM Styles */

/* Filter Pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
}

.filter-select {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 0;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  background-color: #ffffff;
}

.filter-select:hover {
  background-color: #e5e7eb;
}

/* Modern Filter Pills */
.modern-filter-pill {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.modern-filter-pill-group {
  background-color: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 1rem;
  padding: 1rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.modern-filter-select {
  padding-left: 1rem;
  padding-right: 2.5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid rgba(229, 231, 235, 0.8);
  background-color: rgba(255, 255, 255, 0.9);
  color: #374151;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  cursor: pointer;
  appearance: none;
  backdrop-filter: blur(4px);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  position: relative;
  transform: translateY(0);
}

.modern-filter-select:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  border-color: #d1d5db;
  transform: translateY(-1px);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.modern-filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 0 2px rgba(59, 130, 246, 0.4), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  border-color: #3b82f6;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.modern-filter-select:active {
  transform: translateY(0);
}

/* Enhanced select styling for different states */
.modern-filter-select[data-selected="true"] {
  background-color: rgba(239, 246, 255, 0.8);
  border-color: #93c5fd;
  color: #1e40af;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modern-filter-select[data-selected="true"]:hover {
  background-color: rgba(219, 234, 254, 0.8);
  border-color: #60a5fa;
}

/* Special styling for the saved filters select */
.modern-filter-select.saved-filters {
  background-image: linear-gradient(to right, rgba(236, 253, 245, 0.8), rgba(240, 253, 244, 0.8));
  border-color: rgba(167, 243, 208, 0.8);
  color: #065f46;
}

.modern-filter-select.saved-filters:hover {
  background-image: linear-gradient(to right, rgba(209, 250, 229, 0.8), rgba(220, 252, 231, 0.8));
  border-color: rgba(134, 239, 172, 0.8);
}

.modern-filter-select.saved-filters:focus {
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
  border-color: #059669;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23059669' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Custom styling for when a non-default option is selected */
.modern-filter-select:not([value=""]):not([value="All Statuses"]):not([value="All Levels"]):not([value="All Credits"]):not([value="📋 Saved Filters..."]) {
  background-color: rgba(239, 246, 255, 0.9);
  border-color: rgba(147, 197, 253, 0.8);
  color: #1e40af;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modern-filter-select:not([value=""]):not([value="All Statuses"]):not([value="All Levels"]):not([value="All Credits"]):not([value="📋 Saved Filters..."]):hover {
  background-color: rgba(219, 234, 254, 0.9);
  border-color: rgba(96, 165, 250, 0.8);
}

/* Subtle pulse animation for active filters */
@keyframes pulse-filter {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  }
}

.modern-filter-select.has-selection {
  animation: pulse-filter 2s infinite;
}

/* Active filter state styling */
.modern-filter-select.is-active-filter {
  background-image: linear-gradient(to right, #eff6ff, #eef2ff);
  border-color: #60a5fa;
  color: #1e3a8a;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-weight: 600 !important;
}

.modern-filter-select.is-active-filter:hover {
  background-image: linear-gradient(to right, #dbeafe, #e0e7ff);
  border-color: #3b82f6;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.modern-filter-select.is-active-filter:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 0 0 2px rgba(59, 130, 246, 0.3), 0 6px 12px -2px rgba(0, 0, 0, 0.1);
  border-color: #2563eb;
}

/* Special active state for saved filters */
.modern-filter-select.saved-filters.is-active-filter {
  background-image: linear-gradient(to right, #dcfce7, #bbf7d0);
  border-color: #10b981;
  color: #064e3b;
}

.modern-filter-select.saved-filters.is-active-filter:hover {
  background-image: linear-gradient(to right, #bbf7d0, #86efac);
  border-color: #059669;
}

/* Enhanced dropdown arrow for active states */
.modern-filter-select.is-active-filter {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231d4ed8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
}

.modern-filter-select.saved-filters.is-active-filter {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23047857' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
}

.search-filters-form {
  transition: all 0.3s;
}

/* Table Improvements */
.crm-table {
  font-size: 0.875rem;
}

.crm-table th {
  font-weight: 600;
  color: #111827;
  background-color: #ffffff;
}

.crm-table tbody tr:nth-child(even) {
  background-color: rgba(249, 250, 251, 0.3);
}

.crm-table tbody tr:hover {
  background-color: rgba(239, 246, 255, 0.5);
}

/* Enhanced Animations */
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#bulk-actions {
  animation: slideInUp 0.3s ease-out;
}

/* Enhanced Hover Effects */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

/* Improved Focus States */
.focus\:ring-blue-500:focus {
  box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Better Loading States */
.loading-overlay {
  backdrop-filter: blur(4px);
  background-color: rgba(17, 24, 39, 0.2);
}

/* Modern Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  border: 1px solid #e5e7eb;
  color: #374151;
  background-color: #ffffff;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 2px #e5e7eb, 0 0 0 4px rgba(229, 231, 235, 0.2);
}

/* Enhanced Card Styles */
.card {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
}

.card-header {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(to right, #f9fafb, #ffffff);
}

/* Improved Form Styles */
.form-input {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  color: #111827;
  transition: all 0.2s;
}

.form-input::placeholder {
  color: #6b7280;
}

.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: transparent;
}

/* Original Styles (preserved) */

.crm-table {
  font-size: 0.875rem;
}

.crm-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgb(249 250 251);
  border-bottom: 1px solid rgb(229 231 235);
}

.crm-table td {
  border-right: 1px solid rgb(243 244 246);
  vertical-align: middle;
}

.crm-table tr:hover {
  background-color: rgb(249 250 251);
}

/* Sticky first two columns - selection and first data column */
.crm-table th:first-child,
.crm-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: white;
  border-right: 2px solid rgb(229 231 235);
  width: 5rem; /* Fixed width for consistent calculations */
}

.crm-table th:first-child {
  background-color: rgb(249 250 251);
  z-index: 15;
}

.crm-table tr:hover td:first-child {
  background-color: rgb(249 250 251);
}

/* Sticky second column (first data column) */
.crm-table th:nth-child(2),
.crm-table td:nth-child(2) {
  position: sticky;
  left: 3rem; /* Position right after the first column */
  z-index: 4;
  background-color: white;
  border-right: 2px solid rgb(229 231 235);
  min-width: 200px;
  white-space: normal;
}

.crm-table th:nth-child(2) {
  background-color: rgb(249 250 251);
  z-index: 14;
}

.crm-table tr:hover td:nth-child(2) {
  background-color: rgb(249 250 251);
}

/* Editable field styles */
.editable-field {
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.15s ease-in-out;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.editable-field:hover {
  background-color: rgb(243 244 246);
  box-shadow: inset 0 0 0 1px rgb(209 213 219);
}

.editable-field.editing {
  background-color: white;
  box-shadow: inset 0 0 0 2px rgb(99 102 241);
  padding: 4px;
}

.editable-field.editing:hover {
  background-color: white;
}

/* Input styling within editable fields */
.editable-field input,
.editable-field select,
.editable-field textarea {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent;
  font-size: 0.875rem;
  padding: 4px 6px;
  width: 100%;
}

.editable-field textarea {
  resize: vertical;
  min-height: 60px;
}

/* Column minimum widths for better layout */
.crm-table th,
.crm-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Note: Second column sticky positioning and styling is handled above */

.crm-table th:nth-child(3),
.crm-table td:nth-child(3),
.crm-table th:nth-child(4),
.crm-table td:nth-child(4) {
  min-width: 120px;
}

.crm-table th:nth-child(5),
.crm-table td:nth-child(5),
.crm-table th:nth-child(6),
.crm-table td:nth-child(6) {
  min-width: 100px;
}

.crm-table th:nth-child(7),
.crm-table td:nth-child(7),
.crm-table th:nth-child(8),
.crm-table td:nth-child(8) {
  min-width: 120px;
}

/* Custom field and tag columns */
.crm-table th:nth-child(n+9),
.crm-table td:nth-child(n+9) {
  min-width: 150px;
  max-width: 200px;
}

/* Bulk actions bar styling */
#bulk-actions {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%) translateX(-50%);
    opacity: 0;
  }
  to {
    transform: translateY(0) translateX(-50%);
    opacity: 1;
  }
}

/* Loading overlay */
#loading-overlay {
  backdrop-filter: blur(2px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .crm-table {
    font-size: 0.8125rem;
  }

  .crm-table th,
  .crm-table td {
    padding: 0.5rem 0.75rem;
  }

  .editable-field {
    padding: 6px;
    min-height: 28px;
  }
}

@media (max-width: 768px) {
  .crm-table th:nth-child(n+6),
  .crm-table td:nth-child(n+6) {
    display: none;
  }

  .crm-table th:nth-child(2),
  .crm-table td:nth-child(2) {
    min-width: 150px;
  }
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-active {
  background-color: rgb(220 252 231);
  color: rgb(22 101 52);
}

.status-suspended {
  background-color: rgb(254 226 226);
  color: rgb(153 27 27);
}

.status-expired {
  background-color: rgb(254 243 199);
  color: rgb(146 64 14);
}

/* User level badges */
.level-paid {
  background-color: rgb(224 231 255);
  color: rgb(55 48 163);
}

.level-free {
  background-color: rgb(243 244 246);
  color: rgb(55 65 81);
}

/* Scrollbar styling for webkit browsers */
.overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: rgb(243 244 246);
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: rgb(209 213 219);
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: rgb(156 163 175);
}

/* Focus styles for accessibility */
.account-checkbox:focus,
#select-all:focus {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 2px;
}

/* Toast notification styles */
.toast-notification {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Inline Add Column Form Styling */
#add-column-form {
  animation: slideDown 0.2s ease-out;
}

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

/* Column Type Buttons */
.column-type-btn {
  transition: all 0.2s ease-in-out;
}

.column-type-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Field List Styling */
#fields-list, #tags-list {
  max-height: 200px;
}

#fields-list:empty::after,
#tags-list:empty::after {
  content: "No fields available";
  display: block;
  text-align: center;
  color: #9CA3AF;
  font-style: italic;
  padding: 1rem;
}

/* Add Column Header Hover Effect */
#add-column-header:hover {
  transform: scale(1.02);
}

/* Tag Form Styling */
#quick-tag-form {
  animation: slideDown 0.2s ease-out;
}

/* Button Styling for Lists */
.add-field-btn, .edit-existing-tag-btn, .delete-existing-tag-btn {
  transition: all 0.15s ease-in-out;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.add-field-btn:hover {
  background-color: rgb(239 246 255);
}

.edit-existing-tag-btn:hover {
  background-color: rgb(239 246 255);
}

.delete-existing-tag-btn:hover {
  background-color: rgb(254 242 242);
}

/* Header Edit/Remove Button Styling */
.edit-tag-btn, .remove-column-btn {
  transition: opacity 0.2s ease-in-out, color 0.15s ease-in-out;
  padding: 0.25rem;
  border-radius: 0.25rem;
}

.edit-tag-btn:hover, .remove-column-btn:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Column Drag and Drop Styling */
.column-header {
  transition: all 0.2s ease-in-out;
}

.column-header.draggable {
  cursor: grab;
}

.column-header.dragging {
  opacity: 0.6;
  cursor: grabbing;
  transform: rotate(3deg);
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.column-header.drag-over {
  background-color: rgb(233 243 255) !important;
  border-left: 3px solid rgb(59 130 246);
  transform: scale(1.02);
}

.column-header.drag-over-right {
  border-right: 3px solid rgb(59 130 246);
  border-left: none;
}

.column-header .drag-handle {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  cursor: grab;
  margin-right: 0.5rem;
  color: rgb(156 163 175);
}

.column-header:hover .drag-handle {
  opacity: 1;
}

.column-header .drag-handle:hover {
  color: rgb(99 102 241);
}

.column-header .drag-handle:active {
  cursor: grabbing;
}

/* Table adjustments for dragging */
.crm-table thead {
  position: relative;
}

.crm-table .column-header {
  user-select: none;
}

/* Admin Sidebar Collapsible Styles */
.admin-sidebar {
  width: 16rem; /* Default expanded width (w-64) */
  min-width: 4rem; /* Minimum collapsed width (w-16) */
}

.admin-sidebar[data-collapsed="true"] {
  width: 4rem;
}

.admin-sidebar[data-collapsed="true"] .sidebar-text {
  display: none;
}

.admin-sidebar[data-collapsed="true"] .sidebar-submenu {
  display: none;
}

.admin-sidebar[data-collapsed="true"] .sidebar-footer-section {
  display: none;
}

/* Ensure icons remain visible and centered when collapsed */
.admin-sidebar[data-collapsed="true"] .group {
  justify-content: center;
}

.admin-sidebar[data-collapsed="true"] svg {
  margin-right: 0;
}

/* Smooth transitions */
.admin-sidebar,
.admin-sidebar .sidebar-text,
.admin-sidebar [data-admin-sidebar-target="toggleIcon"] {
  transition: all 0.3s ease-in-out;
}

/* Account Drawer Styles */
#account-drawer {
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  background: white;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  border-left: 1px solid rgb(229 231 235);
}

#account-drawer.translate-x-full {
  transform: translateX(100%);
}

#drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  backdrop-filter: blur(2px);
}

/* Drawer header styling */
#account-drawer .drawer-header {
  border-bottom: 1px solid rgb(229 231 235);
  background: rgb(249 250 251);
}

/* Content scrolling */
#drawer-content {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

/* Smooth scrollbar for drawer content */
#drawer-content::-webkit-scrollbar {
  width: 6px;
}

#drawer-content::-webkit-scrollbar-track {
  background: rgb(243 244 246);
}

#drawer-content::-webkit-scrollbar-thumb {
  background: rgb(209 213 219);
  border-radius: 3px;
}

#drawer-content::-webkit-scrollbar-thumb:hover {
  background: rgb(156 163 175);
}

/* Section headers in drawer */
#drawer-details h3 {
  color: rgb(55 65 81);
  font-weight: 600;
}

/* Drawer field labels */
#drawer-details label {
  color: rgb(107 114 128);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Drawer field values */
#drawer-details p {
  color: rgb(17 24 39);
  font-size: 0.875rem;
}

/* Status and level badges in drawer */
#drawer-details .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Custom field and tag sections */
#custom-fields-section,
#crm-tags-section {
  background: rgb(249 250 251);
}

/* Empty state styling */
#drawer-details .italic {
  font-style: italic;
  color: rgb(107 114 128);
}

/* Loading animation in drawer */
#drawer-loading .animate-spin {
  animation: spin 1s linear infinite;
}

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

/* Responsive drawer */
@media (max-width: 1024px) {
  #account-drawer {
    width: 80vw;
    max-width: none;
  }
}

@media (max-width: 768px) {
  #account-drawer {
    width: 100vw;
    max-width: none;
  }

  #drawer-content {
    padding: 1rem;
  }

  #drawer-details .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Email field hover effect enhancement */
[data-action="open-account-drawer"] {
  position: relative;
}

[data-action="open-account-drawer"]:hover {
  text-decoration: underline;
}

[data-action="open-account-drawer"]::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: rgb(37 99 235);
  transform: scaleX(0);
  transition: transform 0.2s ease-in-out;
}

[data-action="open-account-drawer"]:hover::after {
  transform: scaleX(1);
}

/* Drawer close button hover effect */
#close-drawer:hover {
  background: rgb(229 231 235);
  border-radius: 0.5rem;
}

/* Drawer animation improvements */
#account-drawer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#drawer-overlay {
  transition: opacity 0.3s ease-in-out;
}

#drawer-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Drawer Editable Fields */
.drawer-editable-field {
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.drawer-editable-field:hover {
  background-color: rgb(249 250 251) !important;
  border-color: rgb(209 213 219) !important;
}

.drawer-editable-field.editing {
  background-color: white !important;
  border-color: rgb(99 102 241) !important;
  padding: 4px;
}

.drawer-editable-field.editing:hover {
  background-color: white !important;
}

/* Input styling within drawer editable fields */
.drawer-editable-field input,
.drawer-editable-field select,
.drawer-editable-field textarea {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent;
  font-size: 0.875rem;
  padding: 4px 6px;
  width: 100%;
}

.drawer-editable-field textarea {
  resize: vertical;
  min-height: 60px;
}

/* Creation form animations */
#drawer-custom-field-form,
#drawer-tag-form {
  animation: slideDown 0.2s ease-out;
}

/* Button hover effects in drawer */
#drawer-add-custom-field:hover,
#drawer-add-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form styling in drawer */
#drawer-custom-field-form input,
#drawer-custom-field-form select,
#drawer-custom-field-form textarea,
#drawer-tag-form input,
#drawer-tag-form select,
#drawer-tag-form textarea {
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#drawer-custom-field-form input:focus,
#drawer-custom-field-form select:focus,
#drawer-custom-field-form textarea:focus,
#drawer-tag-form input:focus,
#drawer-tag-form select:focus,
#drawer-tag-form textarea:focus {
  border-color: rgb(99 102 241);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
/* Admin-specific styles for improved form design */

/* ===============================================
   MODERN SELECT DROPDOWN STYLING
   =============================================== */

/* Default styling for all select elements in admin */

.admin-body {


	input[type="text"]:focus,
	input[type="email"]:focus,
	input[type="password"]:focus,
	input[type="number"]:focus,
	input[type="tel"]:focus,
	input[type="url"]:focus,
	input[type="search"]:focus,
	input[type="date"]:focus,
	input[type="datetime-local"]:focus,
	input[type="time"]:focus,
	textarea:focus {
		outline: none;
		border-color: #4f46e5;
		box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
	}

	input[type="text"]:hover,
	input[type="email"]:hover,
	input[type="password"]:hover,
	input[type="number"]:hover,
	input[type="tel"]:hover,
	input[type="url"]:hover,
	input[type="search"]:hover,
	input[type="date"]:hover,
	input[type="datetime-local"]:hover,
	input[type="time"]:hover,
	textarea:hover {
		border-color: #9ca3af;
	}

	input::placeholder,
	textarea::placeholder {
		color: #9ca3af;
	}

	input:disabled,
	textarea:disabled {
		background-color: #f9fafb;
		color: #9ca3af;
		cursor: not-allowed;
	}

	/* Textarea specific styling */
	textarea {
		resize: vertical;
		min-height: 2.5rem;
	}

	/* Label styling */
	label {
		display: block;
		font-size: 0.875rem;
		font-weight: 500;
		color: #374151;
		margin-bottom: 0.5rem;
	}

	/* Checkbox and radio styling */
	input[type="checkbox"],
	input[type="radio"] {
		width: 1rem;
		height: 1rem;
		color: #4f46e5;
		border-radius: 0.25rem;
		border: 1px solid #d1d5db;
		background-color: #ffffff;
		margin-right: 0.5rem;
	}

	input[type="radio"] {
		border-radius: 50%;
	}

	input[type="checkbox"]:focus,
	input[type="radio"]:focus {
		box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
		border-color: #4f46e5;
	}



	/* Select styling */
	select {
		position: relative;
		display: block;
		width: 100%;
		padding: 0.75rem 2.5rem 0.75rem 0.75rem;
		font-size: 0.875rem;
		line-height: 1.25rem;
		color: #374151;
		background-color: #ffffff;
		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
		background-position: right 0.5rem center;
		background-repeat: no-repeat;
		background-size: 1.5em 1.5em;
		border: 1px solid #d1d5db;
		border-radius: 0.5rem;
		box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
		transition: all 0.15s ease-in-out;
		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
	}

	select:focus {
		outline: none;
		border-color: #4f46e5;
		box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234f46e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
	}

	select:hover {
		border-color: #9ca3af;
	}

	select:disabled {
		background-color: #f9fafb;
		color: #9ca3af;
		cursor: not-allowed;
	}

}

.admin-select {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #374151;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.admin-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234f46e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.admin-select:hover {
  border-color: #9ca3af;
}

.admin-select:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* ===============================================
   ENHANCED FORM INPUTS
   =============================================== */

.admin-input {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #374151;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
}

.admin-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.admin-input:hover {
  border-color: #9ca3af;
}

.admin-input::placeholder {
  color: #9ca3af;
}

.admin-input:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Text area specific styling */
.admin-input[type="textarea"],
textarea.admin-input {
  resize: vertical;
  min-height: 2.5rem;
}

/* ===============================================
   CHECKBOX STYLING
   =============================================== */

.admin-checkbox-container {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.15s ease-in-out;
}

.admin-checkbox-container:hover {
  border-color: #9ca3af;
  background-color: #f3f4f6;
}

.admin-checkbox-container input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1rem;
  height: 1rem;
  color: #4f46e5;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
}

.admin-checkbox-container input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  border-color: #4f46e5;
}

.admin-checkbox-container span {
  font-size: 0.875rem;
  color: #374151;
}

/* ===============================================
   FORM FIELD GROUPS
   =============================================== */

.admin-form-group {
  margin-bottom: 1.5rem;
}

.admin-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.admin-form-label.required::after {
  content: " *";
  color: #ef4444;
}

.admin-form-help {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.admin-form-error {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #ef4444;
  line-height: 1.4;
}

/* ===============================================
   ENHANCED BUTTONS
   =============================================== */

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  gap: 0.5rem;
}

.admin-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.admin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-btn-primary {
  background-color: #4f46e5;
  color: #ffffff;
}

.admin-btn-primary:hover:not(:disabled) {
  background-color: #4338ca;
}

.admin-btn-secondary {
  background-color: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.admin-btn-secondary:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.admin-btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.admin-btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

/* ===============================================
   FORM LAYOUT IMPROVEMENTS
   =============================================== */

.admin-form {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

.admin-form-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.admin-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.admin-form-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* ===============================================
   RESPONSIVE FORM GRID
   =============================================== */

.admin-form-grid {
  display: grid;
  gap: 1.5rem;
}

.admin-form-grid-2 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .admin-form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-form-grid-3 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .admin-form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .admin-form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===============================================
   ERROR HANDLING
   =============================================== */

.admin-error-summary {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 2rem;
}

.admin-error-summary h3 {
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.admin-error-summary ul {
  color: #7f1d1d;
  font-size: 0.875rem;
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.admin-error-summary li {
  margin-bottom: 0.25rem;
}

.admin-field-error .admin-input,
.admin-field-error .admin-select {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.admin-field-error .admin-input:focus,
.admin-field-error .admin-select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ===============================================
   UTILITIES
   =============================================== */

.admin-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-fade-in {
  animation: adminFadeIn 0.3s ease-in-out;
}

@keyframes adminFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================================
   PROFILE VIEW STYLING
   =============================================== */

.admin-profile-section {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-profile-section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.admin-profile-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.admin-profile-section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.admin-detail-list {
  display: grid;
  gap: 1.5rem;
}

.admin-detail-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 640px) {
  .admin-detail-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.admin-detail-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

.admin-detail-value {
  font-size: 0.875rem;
  color: #111827;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-status-badge.admin {
  background-color: #e0e7ff;
  color: #3730a3;
}

.admin-status-badge.assistant {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.admin-status-badge.user {
  background-color: #f3f4f6;
  color: #374151;
}

.admin-status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.admin-status-badge.inactive {
  background-color: #fecaca;
  color: #991b1b;
}

/* ===============================================
   MOBILE RESPONSIVE
   =============================================== */

@media (max-width: 640px) {
  .admin-form {
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 0.5rem;
  }

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

  .admin-btn {
    width: 100%;
    justify-content: center;
  }
}
/* Marketing page specific styles - Modern & Bold */

/* Typography */
.montserrat {
  font-family: 'Montserrat', sans-serif;
}

.inter {
  font-family: 'Inter', sans-serif;
}

/* Gradient Text */
.gradient-text {
  background-image: linear-gradient(90deg, #4f46e5, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Blob Animation */
@keyframes blob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(50px, 50px) scale(1.05);
  }
}

.animate-blob {
  animation: blob 20s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

.animation-delay-1000 {
  animation-delay: 1s;
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Pulse Animation for Badges */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Backgrounds */
.bg-gradient-radial {
  background: radial-gradient(circle at center, var(--tw-gradient-stops));
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Custom Shadow Styles */
.shadow-3xl {
  box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
}

.shadow-4xl {
  box-shadow: 0 45px 80px -20px rgba(0, 0, 0, 0.4);
}

/* Glow Effects */
.glow-blue {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5),
              0 0 40px rgba(59, 130, 246, 0.3),
              0 0 60px rgba(59, 130, 246, 0.1);
}

.glow-emerald {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5),
              0 0 40px rgba(16, 185, 129, 0.3),
              0 0 60px rgba(16, 185, 129, 0.1);
}

.glow-purple {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5),
              0 0 40px rgba(139, 92, 246, 0.3),
              0 0 60px rgba(139, 92, 246, 0.1);
}

/* Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.animate-shimmer {
  animation: shimmer 3s infinite linear;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  background-size: 1000px 100%;
}

/* Responsive Text Sizes */
@media (max-width: 640px) {
  .text-hero {
    font-size: 2.5rem;
    line-height: 1.1;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .text-hero {
    font-size: 3.5rem;
    line-height: 1.1;
  }
}

@media (min-width: 1025px) {
  .text-hero {
    font-size: 4.5rem;
    line-height: 1.1;
  }
}

/* Better Focus States for Accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Improved Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Video Container Aspect Ratio Helper */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Gradient Border Effect */
.gradient-border {
  position: relative;
  background: white;
  border-radius: 1rem;
  padding: 2px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Text Selection Styling */
::selection {
  background-color: #3b82f6;
  color: white;
}

::-moz-selection {
  background-color: #3b82f6;
  color: white;
}

/* Loading Animation */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 3s linear infinite;
}

/* Fade In Animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out;
}

/* Slide Up Animation */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out;
}

/* Scale In Animation */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scale-in 0.5s ease-out;
}

/* Prevent layout shift */
img {
  max-width: 100%;
  height: auto;
}

/* Smooth color transitions */
.smooth-color {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

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

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *




 */

/* Custom styles for the Airtable-like CRM interface */
.crm-table-container {
  max-height: 80vh;
  overflow: auto;
}

.crm-table {
  font-size: 0.875rem;
  min-width: 100%;
}

.crm-table th {
  font-weight: 500;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.crm-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 20;
}

.crm-table td:first-child {
  position: sticky;
  left: 0;
  background: white;
  z-index: 5;
}

.crm-table tr:hover td:first-child {
  background: #f9fafb;
}

.editable-field {
  cursor: pointer;
  border-radius: 4px;
  padding: 4px 8px;
  transition: all 0.2s ease;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.editable-field:hover {
  background-color: #f3f4f6;
  box-shadow: 0 0 0 1px #d1d5db;
}

.editable-field.editing {
  background-color: #dbeafe;
  box-shadow: 0 0 0 2px #3b82f6;
}

.editable-field input,
.editable-field select,
.editable-field textarea {
  border: none;
  background: transparent;
  width: 100%;
  padding: 2px 4px;
  font-size: inherit;
  color: inherit;
  border-radius: 4px;
}

.editable-field input:focus,
.editable-field select:focus,
.editable-field textarea:focus {
  outline: none;
  background-color: white;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  padding: 4px;
}

/* Loading states */
.table-loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-cell {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Custom pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}



.pagination a:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination .current {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive pagination */
@media (max-width: 640px) {
  .pagination {
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    min-width: 2rem;
  }

  /* Hide some page numbers on very small screens */
  .pagination .ellipsis {
    display: none;
  }
}

/* Pagination container responsive layout */
@media (max-width: 768px) {
  .pagination-container {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .pagination-info {
    text-align: center;
  }
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-active {
  background-color: #dcfce7;
  color: #166534;
}

.status-suspended {
  background-color: #fecaca;
  color: #991b1b;
}

.status-expired {
  background-color: #fef3c7;
  color: #92400e;
}

/* Responsive improvements */
@media (max-width: 1024px) {
  .crm-table {
    font-size: 0.8rem;
  }

  .crm-table th,
  .crm-table td {
    padding: 0.5rem 0.75rem;
  }
}
