/* Admin Menu Icon */
#toplevel_page_pearlbot .wp-menu-image img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  padding: 6px 0 !important;
}

.pearlbot-dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 24px;
  margin: 20px 0;
  background: #fff;
  border-radius: 8px;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pearlbot-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pearlbot-title-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.pearlbot-dashboard-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: #1d2327;
}

.pearlbot-logo {
  width: 140px;
  height: auto;
  max-height: 65px;
  object-fit: contain;
}

.pearlbot-version {
  font-size: 14px;
  color: #646970;
  font-weight: 500;
  background: #f0f6fc;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #c5d9ed;
}

.pearlbot-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pearlbot-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f0f6ea;
  color: #2a5a12;
  border: 1px solid #c5e1a5;
}

.pearlbot-status.inactive {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.pearlbot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pearlbot-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: #f6f7f7;
  border-radius: 8px;
}

.pearlbot-nav-item {
  padding: 8px 16px;
  border-radius: 6px;
  color: #1d2327;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pearlbot-nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.pearlbot-nav-item.active {
  background: #fff;
  color: #2271b1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

@media screen and (max-width: 782px) {
  .pearlbot-header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .pearlbot-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .pearlbot-header-nav {
    overflow-x: auto;
    width: 100%;
    padding: 4px;
  }
}

/* Main Container */
.pearlbot-settings-section {
  background: #fff;
  border: 1px solid #e2e4e7;
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  max-width: 800px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Header Styles */
.pearlbot-settings-section h2 {
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f1;
  color: #1d2327;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.pearlbot-settings-description {
  margin-bottom: 24px;
  color: #50575e;
  font-size: 14px;
  line-height: 1.5;
}

/* Form Elements */
.field-help {
  color: #646970;
  font-size: 13px;
  margin: 6px 0 0;
  line-height: 1.5;
}

.description {
  font-size: 13px;
  color: #646970;
  margin-top: 6px;
  line-height: 1.5;
}

/* External Links */
.pearlbot-external-link {
  text-decoration: none;
  color: #2271b1;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.pearlbot-external-link:hover {
  color: #135e96;
  background-color: rgba(34, 113, 177, 0.05);
}

.pearlbot-external-link .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.pearlbot-external-link:hover .dashicons {
  transform: translateX(2px);
}

/* Form Container */
.pearlbot-form-container {
  background: #fff;
  border-radius: 8px;
}

/* Form Groups */
.pearlbot-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
}

.pearlbot-form-group:last-child {
  margin-bottom: 0;
}

/* Labels */
.pearlbot-label {
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pearlbot-required {
  color: #d63638;
  font-size: 14px;
  line-height: 1;
}

/* Input Fields */
.pearlbot-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pearlbot-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  transition: all 0.2s ease;
  background-color: #fff;
}

.pearlbot-input:hover {
  border-color: #50575e;
}

.pearlbot-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

.pearlbot-input::placeholder {
  color: #8c8f94;
  opacity: 0.8;
}

/* Password Toggle Button */
.pearlbot-toggle-password {
  padding: 6px 12px;
  height: 31px;
  background: #f0f0f1;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pearlbot-toggle-password:hover {
  background: #e0e0e0;
  border-color: #50575e;
}

/* Help Text */
.pearlbot-help-text {
  font-size: 13px;
  color: #646970;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* WooCommerce Button */
.button .dashicons {
  margin: 0 8px 2px 0;
  vertical-align: middle;
}

/* API Key Section */
.api-key-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
  .pearlbot-settings-section {
    padding: 16px;
  }

  .form-table th {
    width: 100%;
    padding-bottom: 8px;
  }

  .api-key-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pearlbot-toggle-password {
    width: fit-content;
  }
}