/* Layout and Cards */
.crm-settings-wrap {
    max-width: 1200px !important;
    margin: 20px 20px 20px 0 !important;
    background: #fff !important;
    padding: 20px !important;
}

/* Notice Positioning */
.notice {
    margin: 20px 20px 0 0 !important;
}

.crm-settings-wrap .notice {
    margin: 0 0 20px 0 !important;  /* Different margin for notices inside the wrap */
}

/* Adjust logo display */
.crm-logo-link {
  display: block !important;
}

/* Ensure proper header spacing */
.crm-header-wrap {
   gap: 20px !important;
   padding: 0 !important;
   margin: 0 0 20px 0 !important;
}

/* Stats Banner */
.crm-stats-banner {
    display: flex !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin: 20px 0 !important;
}

.crm-stat-item {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    background: white !important;
    padding: 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.crm-stat-content {
    display: flex !important;
    flex-direction: column !important;
}

.crm-stat-number {
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #1d2327 !important;
}

.crm-stat-label {
    font-size: 13px !important;
    color: #50575e !important;
}

/* Cards */
.crm-card {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    margin-bottom: 20px !important;
    border: 1px solid #ddd !important;
}

.crm-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #f0f0f1 !important;
    background: #f8f9fa !important;
}

.crm-card-header h2 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.crm-card-content {
    padding: 20px !important;
}

/* Form Fields */
.crm-field-row {
    margin-bottom: 20px !important;
}

.crm-field-row label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
}

.crm-field-row input[type='number'],
.crm-field-row input[type='email'] {
    width: 100% !important;
    max-width: 400px !important;
}

/* Checkbox and Radio Groups */
.crm-checkbox-group,
.crm-radio-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* Toggle Switch */
.crm-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .crm-stats-banner {
        flex-direction: column !important;
    }
    .crm-stat-item {
        margin-bottom: 10px !important;
    }
}

/* Content Monitoring Layout */
.crm-monitoring-grid {
    display: grid !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.crm-monitoring-section {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    border: 1px solid #ddd !important;
    padding: 20px !important;
}

.crm-monitoring-section h3 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f0f0f1 !important;
}

/* Grid layout for larger screens */
@media screen and (min-width: 783px) {
    .crm-monitoring-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Adjust checkbox groups layout */
.crm-monitoring-section .crm-checkbox-group {
    max-height: 300px !important;
    overflow-y: auto !important;
    padding-right: 10px !important;
}

/* Scrollbar styling */
.crm-monitoring-section .crm-checkbox-group::-webkit-scrollbar {
    width: 6px !important;
}

.crm-monitoring-section .crm-checkbox-group::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.crm-monitoring-section .crm-checkbox-group::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 3px !important;
}

.crm-monitoring-section .crm-checkbox-group::-webkit-scrollbar-thumb:hover {
    background: #666 !important;
}        

/* License notification */
.crm-license-notice {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 20px !important;
  background: white !important;
  border-left: 4px solid #72aee6 !important;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04) !important;
  margin-bottom: 20px !important;
}

/* Header section */
.crm-title {
    margin: 0 !important;
    padding: 0 !important;
}

/* Notice Positioning */

/* Header Layout - ensure it stays together*/
.crm-header {
   display: flex !important;
   justify-content: space-between !important;
   align-items: center !important;
   margin-bottom: 20px !important;
   padding: 0 !important;
   width: 100% !important;
   background: #fff !important;
   position: relative !important;
   z-index: 2 !important;
}

.crm-title-area {
    flex: 1 !important;
}

.crm-title-area h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.crm-header-actions {
   display: flex !important;
   align-items: center !important;
   gap: 15px !important;
}

.crm-go-pro {
  background: #2271b1 !important;
  color: white !important;
  text-decoration: none !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  transition: background-color 0.2s !important;
  white-space: nowrap !important;
}

.crm-go-pro:hover {
    background: #135e96 !important;
    color: white !important;
}

/* Hide all notices except our own */
.notice:not(.crm-notice),
.elementor-message,
div[class*=\"notice-\"],
#wpbody-content > div:not(.wrap):not(.crm-settings-wrap) {
    display: none !important;
}