/**
 * Settings Page Styles - Modern Design
 */

/* ========================================
   PAGE HEADER
   ======================================== */
.pdt-settings-wrap {
  margin: 20px 20px 20px 0;
}

.pdt-page-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: #fff;
}

.pdt-page-header .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  opacity: 0.9;
}

.pdt-page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
}

.pdt-page-header p {
  margin: 4px 0 0;
  opacity: 0.9;
  font-size: 14px;
}

/* Keep notices readable and full-width on settings pages */
.pdt-settings-wrap .notice {
  margin: 0 0 20px 0;
}

/* License/update/save notices that appear in the purple header */
.pdt-page-header .notice {
  flex: 1 1 100%;
  width: 100%;
  margin: 8px 0 0 0;
  box-sizing: border-box;
  color: #1d2327;
  background: #fff;
}

.pdt-page-header .notice p,
.pdt-page-header .notice a {
  color: #1d2327;
  opacity: 1;
}

.pdt-page-header .notice-dismiss {
  color: #646970;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.pdt-settings-container {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* ========================================
   TABS NAVIGATION
   ======================================== */
.pdt-settings-tabs {
  width: 235px;
  background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
  border-right: 1px solid #e9ecef;
  flex-shrink: 0;
  padding: 8px 0;
}

.pdt-tab-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  margin: 4px 8px;
  color: #495057;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}

.pdt-tab-link:hover {
  background: rgba(102, 126, 234, 0.08);
  color: #667eea;
}

.pdt-tab-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.pdt-tab-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pdt-tab-link .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
}

/* ========================================
   SETTINGS CONTENT
   ======================================== */
.pdt-settings-content {
  flex: 1;
  padding: 32px;
  min-height: 500px;
  background: #fff;
}

/* ========================================
   SETTINGS SECTIONS
   ======================================== */
.pdt-settings-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e9ecef;
}

.pdt-settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pdt-settings-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #212529;
  letter-spacing: -0.3px;
}

.pdt-settings-section > .description {
  color: #6c757d;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
}

/* ========================================
   FORM ROWS
   ======================================== */
.pdt-form-row {
  margin-bottom: 24px;
}

.pdt-form-row > label:not(.pdt-toggle-switch):not(.pdt-user-checkbox):not(.pdt-role-checkbox) {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #212529;
  font-size: 14px;
  margin-top: 25px;
}

.pdt-form-row .description {
  color: #6c757d;
  font-size: 13px;
  margin: 6px 0 16px;
  line-height: 1.5;
}

.pdt-form-row select {
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pdt-form-row select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ========================================
   TOGGLE SWITCH - MODERN
   ======================================== */
.pdt-settings-wrap .pdt-toggle-switch {
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
}

.pdt-settings-wrap .pdt-toggle-switch input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.pdt-settings-wrap .pdt-toggle-slider {
  position: relative !important;
  display: inline-block !important;
  width: 52px !important;
  min-width: 52px !important;
  height: 28px !important;
  background: #dee2e6 !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 14px !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
}

.pdt-settings-wrap .pdt-toggle-slider::after {
  content: '' !important;
  position: absolute !important;
  width: 22px !important;
  height: 22px !important;
  background: #fff !important;
  border-radius: 50% !important;
  top: 3px !important;
  left: 3px !important;
  transition: transform 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.pdt-settings-wrap .pdt-toggle-switch input:checked + .pdt-toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}

.pdt-settings-wrap .pdt-toggle-switch input:checked + .pdt-toggle-slider::after {
  transform: translateX(24px) !important;
}

.pdt-settings-wrap .pdt-toggle-switch:hover .pdt-toggle-slider {
  background: #ced4da !important;
}

.pdt-settings-wrap .pdt-toggle-switch input:checked + .pdt-toggle-slider:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
}

.pdt-settings-wrap .pdt-toggle-label {
  display: inline-block !important;
  font-weight: 600 !important;
  color: #212529 !important;
  font-size: 14px !important;
  line-height: 28px !important;
  vertical-align: middle !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ========================================
   USER SELECTION
   ======================================== */
.pdt-user-selection {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  display: none;
}

.pdt-user-selection.is-visible {
  display: block;
}

.pdt-user-selection > label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 6px;
}

.pdt-user-selection > .description {
  color: #6c757d;
  font-size: 13px;
  margin: 0 0 16px;
}

.pdt-user-checkboxes {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px;
}

.pdt-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 200px;
  max-width: 100%;
  padding: 20px 16px 16px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.pdt-user-card:hover {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.04) 0%, rgba(118, 75, 162, 0.02) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.pdt-user-card.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.04) 100%);
}

.pdt-user-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.pdt-user-card input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

.pdt-user-card input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pdt-user-card input[type="checkbox"]:hover {
  border-color: #667eea;
}

.pdt-user-card .pdt-user-avatar {
  margin-bottom: 12px;
}

.pdt-user-card .pdt-user-avatar img {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50%;
  border: 3px solid #e9ecef;
  transition: all 0.2s ease;
}

.pdt-user-card:hover .pdt-user-avatar img,
.pdt-user-card.selected .pdt-user-avatar img {
  border-color: #667eea;
}

.pdt-user-card .pdt-user-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 4px;
  transition: color 0.2s;
  width: 100%;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pdt-user-card.selected .pdt-user-name {
  color: #667eea;
}

.pdt-user-card .pdt-user-email {
  display: block;
  font-size: 12px;
  color: #6c757d;
  width: 100%;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Super Admin Badge */
.pdt-super-admin-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 12px;
}

/* Super Admin Card */
.pdt-user-card.is-super-admin {
  border-color: #667eea;
}

.pdt-user-card.is-super-admin .pdt-user-avatar img {
  border-color: #667eea;
}

/* Locked State - Super Admin can't be unchecked */
.pdt-user-card.locked {
  opacity: 0.85;
}

.pdt-user-card.locked input[type="checkbox"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-color: #667eea !important;
  cursor: not-allowed;
}

.pdt-user-card.locked::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 36px;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23667eea'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Super Admin Notice */
.pdt-super-admin-notice {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-color: rgba(102, 126, 234, 0.2);
}

.pdt-super-admin-notice .dashicons-shield {
  color: #667eea;
}

/* ========================================
   ROLE CHECKBOXES
   ======================================== */
.pdt-role-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.pdt-role-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.pdt-role-checkbox:hover {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.04) 0%, rgba(118, 75, 162, 0.04) 100%);
}

.pdt-role-checkbox input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.pdt-role-checkbox input:checked + span,
.pdt-role-checkbox:has(input:checked) {
  color: #667eea;
}

/* ========================================
   NOTICE BOXES
   ======================================== */
.pdt-warning-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff8e5 0%, #fffbf0 100%);
  border: 1px solid #ffeeba;
  border-left: 4px solid #f0ad4e;
  border-radius: 8px;
  margin-top: 20px;
  color: #856404;
  font-size: 13px;
  line-height: 1.5;
}

.pdt-warning-notice .dashicons {
  color: #f0ad4e;
  font-size: 20px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pdt-super-admin-2fa-warning {
  display: none;
  margin-top: 12px;
}

.pdt-super-admin-2fa-warning.is-visible {
  display: flex;
}

.pdt-super-admin-2fa-warning > div {
  flex: 1;
}

.pdt-super-admin-2fa-warning p {
  margin: 0 0 8px;
}

.pdt-super-admin-2fa-warning ul {
  margin: 0 0 10px 18px;
  padding: 0;
}

.pdt-super-admin-2fa-warning li {
  margin: 0 0 6px;
}

.pdt-super-admin-2fa-warning p:last-child,
.pdt-super-admin-2fa-warning li:last-child {
  margin-bottom: 0;
}

.pdt-info-notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-left: 4px solid #667eea;
  border-radius: 8px;
  margin-bottom: 24px;
}

.pdt-info-notice .dashicons {
  color: #667eea;
  font-size: 28px;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.pdt-info-notice div {
  flex: 1;
}

.pdt-info-notice strong {
  display: block;
  margin-bottom: 6px;
  color: #212529;
  font-size: 15px;
  font-weight: 600;
}

.pdt-info-notice p {
  margin: 0;
  color: #495057;
  font-size: 13px;
  line-height: 1.6;
}

/* ========================================
   2FA OPTIONS
   ======================================== */
.pdt-2fa-options {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  display: none;
}

.pdt-2fa-options.is-visible {
  display: block;
}

.pdt-content-visibility-options {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 1px solid #e9ecef;
  border-radius: 12px;
  display: none;
}

.pdt-content-visibility-options.is-visible {
  display: block;
}

.pdt-email-verify-warning {
  color: #d63638;
}

.pdt-footer-preview {
  margin-top: 5px;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */
.pdt-settings-form .submit {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.pdt-settings-form .button-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  height: auto;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.2s ease;
}

.pdt-settings-form .button-primary:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.pdt-settings-form .button-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media screen and (max-width: 960px) {
  .pdt-settings-container {
    flex-direction: column;
  }
  
  .pdt-settings-tabs {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding: 8px;
    gap: 4px;
  }
  
  .pdt-tab-link {
    flex: 0 0 auto;
    padding: 12px 20px;
    margin: 0;
    white-space: nowrap;
  }
  
  .pdt-settings-content {
    padding: 24px;
  }
  
  .pdt-page-header {
    padding: 20px;
  }
  
  .pdt-page-header h1 {
    font-size: 20px;
  }
}

@media screen and (max-width: 600px) {
  .pdt-settings-wrap {
    margin: 10px 10px 10px 0;
  }
  
  .pdt-page-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .pdt-settings-content {
    padding: 20px 16px;
  }
  
  .pdt-user-selection,
  .pdt-2fa-options,
  .pdt-content-visibility-options {
    padding: 16px;
  }
  
  .pdt-role-checkboxes {
    flex-direction: column;
  }
  
  .pdt-role-checkbox {
    width: 100%;
  }
}

/* ========================================
   EMAIL TEST & RECOVERY SECTIONS
   ======================================== */
.pdt-email-test-box,
.pdt-recovery-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  margin-top: 12px;
}

.pdt-email-test-box .dashicons,
.pdt-recovery-status .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.pdt-email-test-box .dashicons-warning,
.pdt-recovery-status .dashicons-warning {
  color: #f0ad4e;
}

.pdt-email-test-box .dashicons-yes-alt,
.pdt-recovery-status .dashicons-yes-alt {
  color: #22c55e;
}

.pdt-email-test-box.verified {
  border-color: #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
}

.pdt-email-test-box span:not(.dashicons),
.pdt-recovery-status span:not(.dashicons) {
  flex: 1;
  font-weight: 500;
  color: #212529;
}

.pdt-email-test-box .button,
.pdt-recovery-status .button {
  flex-shrink: 0;
}

/* Safety Notice */
.pdt-safety-notice {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.04) 100%) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}

.pdt-safety-notice .dashicons-yes-alt {
  color: #22c55e !important;
}

/* ========================================
   RECOVERY KEYS MODAL
   ======================================== */
.pdt-recovery-keys-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
}

.pdt-recovery-keys-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

.pdt-recovery-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pdt-recovery-modal-close:hover {
  background: #e5e7eb;
  color: #111827;
}

.pdt-recovery-modal-close .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

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

.pdt-recovery-keys-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.pdt-recovery-keys-icon .dashicons {
  font-size: 40px;
  width: 40px;
  height: 40px;
  color: #fff;
}

.pdt-recovery-keys-content h2 {
  margin: 0 0 16px;
  font-size: 24px;
  color: #212529;
}

.pdt-recovery-keys-warning {
  color: #6c757d;
  margin: 0 0 24px;
  line-height: 1.6;
}

.pdt-recovery-keys-warning strong {
  color: #dc2626;
  display: block;
  margin-top: 8px;
}

.pdt-recovery-keys-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.pdt-recovery-keys-list code {
  display: block;
  padding: 10px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  letter-spacing: 1px;
}

.pdt-recovery-keys-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.pdt-recovery-keys-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  height: auto;
}

.pdt-recovery-keys-actions .button .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.pdt-recovery-keys-actions .button-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
}

/* ========================================
   RADIO GROUP STYLES
   ======================================== */
.pdt-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.pdt-radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdt-radio-option:hover {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
}

.pdt-radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #667eea;
  flex-shrink: 0;
}

/* Normalize WP core radio pseudo-element for this settings screen only. */
.pdt-settings-wrap .pdt-radio-option input[type="radio"]:checked::before {
  content: "" !important;
  border-radius: 50% !important;
  width: 0.5rem !important;
  height: 0.5rem !important;
  margin: 5px !important;
  background-color: #667eea !important;
  line-height: 1.14285714 !important;
}

.pdt-radio-option input[type="radio"]:checked + .pdt-radio-label {
  color: #212529;
}

.pdt-radio-option:has(input:checked) {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.pdt-radio-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pdt-radio-label strong {
  font-size: 14px;
  color: #212529;
}

.pdt-radio-label small {
  font-size: 13px;
  color: #6c757d;
}

/* ========================================
   2FA COVERAGE BOX
   ======================================== */
.pdt-2fa-coverage-box {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.pdt-coverage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

.pdt-coverage-header .dashicons {
  color: #667eea;
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.pdt-coverage-header strong {
  font-size: 14px;
  color: #212529;
}

.pdt-coverage-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdt-coverage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.pdt-coverage-item.protected .dashicons {
  color: #22c55e;
}

.pdt-coverage-item.protected span:not(.dashicons) {
  color: #166534;
  font-weight: 500;
}

.pdt-coverage-item.excluded .dashicons {
  color: #f59e0b;
}

.pdt-coverage-item.excluded span:not(.dashicons) {
  color: #92400e;
}

.pdt-coverage-item.none .dashicons {
  color: #9ca3af;
}

.pdt-coverage-item.none span:not(.dashicons) {
  color: #6b7280;
}

/* ========================================
   RECOVERY INFO WITH DATE
   ======================================== */
.pdt-recovery-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.pdt-recovery-info span {
  font-weight: 500;
  color: #212529;
}

.pdt-recovery-date {
  font-size: 12px;
  color: #6c757d;
  font-weight: 400 !important;
}

/* ========================================
   READ-ONLY MODE
   ======================================== */
.pdt-readonly-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  margin-bottom: 24px;
}

.pdt-readonly-banner .dashicons {
  color: #f59e0b;
  font-size: 24px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.pdt-readonly-banner strong {
  display: block;
  color: #92400e;
  font-size: 14px;
  margin-bottom: 4px;
}

.pdt-readonly-banner p {
  margin: 0;
  color: #a16207;
  font-size: 13px;
}

/* Read-only mode form styling */
.pdt-readonly-mode .pdt-settings-form {
  pointer-events: none;
  opacity: 0.7;
}

.pdt-readonly-mode .pdt-settings-form input,
.pdt-readonly-mode .pdt-settings-form select,
.pdt-readonly-mode .pdt-settings-form button,
.pdt-readonly-mode .pdt-settings-form .button {
  cursor: not-allowed !important;
}

.pdt-readonly-mode .pdt-settings-form .submit {
  display: none;
}

/* ========================================
   USER CARD WRAPPER & ACCESS LEVEL
   ======================================== */
.pdt-user-card-wrapper {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
}

.pdt-user-card-wrapper:hover {
  border-color: #667eea;
}

.pdt-user-card-wrapper.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.03) 100%);
}

.pdt-user-card-wrapper.locked {
  border-color: #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
}

.pdt-user-card-wrapper .pdt-user-card {
  width: 100%;
  max-width: 100%;
  min-height: 170px;
  box-sizing: border-box;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: transparent;
  margin: 0;
}

.pdt-user-card-wrapper .pdt-user-card:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.pdt-access-level-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 56px;
  background: rgba(102, 126, 234, 0.08);
  border-top: 1px solid rgba(102, 126, 234, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pdt-access-level-selector.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Keep access panel in sync with checkbox state even if JS fails. */
.pdt-user-card-wrapper:has(.pdt-user-checkbox:checked) .pdt-access-level-selector {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pdt-user-card-wrapper:has(.pdt-user-checkbox:not(:checked)) .pdt-access-level-selector {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pdt-access-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdt-access-select {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #212529;
  cursor: pointer;
  background-image: none !important;
  background-repeat: no-repeat !important;
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
}

.pdt-access-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pdt-access-select:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  background-image: none !important;
}

/* Access level badge for readonly users */
.pdt-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.pdt-access-badge.full {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.pdt-access-badge.readonly {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* ========================================
   EXPORT SECTION
   ======================================== */
.pdt-export-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.03) 100%);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.pdt-export-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #212529;
}

.pdt-export-section .description {
  margin: 0 0 8px;
  color: #6c757d;
}

.pdt-export-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 6px;
  font-size: 12px;
  color: #92400e;
}

.pdt-export-notice .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: #f59e0b;
}

.pdt-export-options {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.pdt-export-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdt-export-range label {
  font-weight: 500;
  color: #495057;
  font-size: 14px;
}

.pdt-export-select {
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  min-width: 150px;
}

.pdt-export-buttons {
  display: flex;
  gap: 12px;
}

.pdt-export-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px !important;
  height: auto !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}

.pdt-export-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.pdt-activity-log-footer-form {
  margin-top: 28px;
}

.pdt-activity-log-settings-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 28px;
}

.pdt-activity-log-settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.pdt-activity-log-setting-card {
  padding: 22px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.04) 0%, rgba(118, 75, 162, 0.03) 100%);
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 14px;
}

.pdt-activity-log-setting-title {
  display: block;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.pdt-activity-log-setting-card .description {
  margin: 0 0 16px;
}

.pdt-activity-log-setting-card .pdt-radio-group {
  margin-top: 0;
}

.pdt-activity-log-settings-footer .submit {
  margin-top: 20px;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .pdt-activity-log-settings-layout {
    grid-template-columns: 1fr;
  }
}

.pdt-section-divider {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 24px 0;
}

/* ========================================
   ACCESS DENIED NOTICE
   ======================================== */
.pdt-access-denied-notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
}

.pdt-access-denied-notice .dashicons {
  color: #dc2626;
  font-size: 24px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.pdt-access-denied-notice strong {
  display: block;
  color: #991b1b;
  font-size: 15px;
  margin-bottom: 4px;
}

.pdt-access-denied-notice p {
  margin: 0;
  color: #b91c1c;
  font-size: 14px;
}

/* ========================================
   SECURITY LOGS TABLE
   ======================================== */
.pdt-security-logs {
  margin-top: 20px;
}

.pdt-security-logs h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: #212529;
}

.pdt-no-logs {
  padding: 40px;
  text-align: center;
  color: #6c757d;
  background: #f8f9fa;
  border-radius: 12px;
}

.pdt-logs-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pdt-logs-table th {
  background: #f8f9fa;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
}

.pdt-logs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f4;
  font-size: 13px;
  color: #212529;
}

.pdt-logs-table tbody tr:hover {
  background: #f8f9fa;
}

.pdt-logs-table tbody tr.severity-critical {
  background: rgba(220, 38, 38, 0.03);
}

.pdt-logs-table tbody tr.severity-warning {
  background: rgba(245, 158, 11, 0.03);
}

.pdt-severity-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.pdt-severity-badge.critical {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.pdt-severity-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.pdt-severity-badge.info {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* User cards responsive grid */
@media screen and (max-width: 960px) {
  .pdt-user-checkboxes {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media screen and (max-width: 600px) {
  .pdt-user-checkboxes {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   2FA METHOD SELECTOR
   ======================================== */
.pdt-2fa-method-selector {
  margin-bottom: 24px;
}

.pdt-method-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.pdt-method-option {
  cursor: pointer;
  display: block;
}

.pdt-method-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pdt-method-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.pdt-method-option:hover .pdt-method-card {
  border-color: #c7d2fe;
  background: #fafbff;
}

.pdt-method-option.is-selected .pdt-method-card {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.pdt-method-option.is-disabled .pdt-method-card {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f9fafb;
}

.pdt-method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #f3f4f6;
  border-radius: 10px;
  flex-shrink: 0;
}

.pdt-method-option.is-selected .pdt-method-icon {
  background: #4f46e5;
}

.pdt-method-icon .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #6b7280;
}

.pdt-method-option.is-selected .pdt-method-icon .dashicons {
  color: #fff;
}

.pdt-method-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pdt-method-info strong {
  font-size: 15px;
  color: #111827;
}

.pdt-method-info span {
  font-size: 13px;
  color: #6b7280;
}

.pdt-method-addon-notice {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #d97706;
}

.pdt-method-check {
  display: none;
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #4f46e5;
}

.pdt-method-option.is-selected .pdt-method-check {
  display: block;
}

/* Method-specific settings panels */
.pdt-2fa-method-settings {
  margin-top: 20px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.pdt-method-authenticator-settings .pdt-settings-section {
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.pdt-method-authenticator-settings .pdt-settings-section h2 {
  margin-top: 0;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  .pdt-method-card {
    flex-wrap: wrap;
  }
  
  .pdt-method-info {
    flex-basis: calc(100% - 64px);
  }
  
  .pdt-method-check {
    flex-basis: 100%;
    text-align: right;
  }
}
