/**
 * YOOAdmin - Users pages styles
 *
 * @package YOOAdmin
 */

.yooadmin-users-page,
.yooadmin-user-create,
.yooadmin-user-profile {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--yp-text);
}

.yooadmin-users-page h1,
.yooadmin-user-create h1,
.yooadmin-user-profile h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--yp-text);
  line-height: 1.3;
}

/* ----------------------------------------------------------------------------
   Hero Section
   ---------------------------------------------------------------------------- */
.yoo-users-hero {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.yoo-users-hero__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yoo-users-hero__header {
  margin-bottom: 0;
}

.yoo-users-hero__title-section {
  margin-bottom: 0;
}

.yoo-users-hero__top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.yoo-users-hero__eyebrow {
  display: inline-block;
  padding: 4px 10px;
  background: #f0f0f1;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yp-text);
  flex-shrink: 0;
}

.yoo-users-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.yoo-users-hero__title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.yoo-users-hero__title-row h1 {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: auto;
}

.yoo-users-hero__title-section h1 {
  margin: 0;
  padding: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--yp-text);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.yoo-users-hero__title-section h1 .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--_yp-primary, #eda934);
}

.yoo-users-search-wrapper {
  position: relative;
  flex: 0 0 auto;
  width: 400px !important;
  max-width: 400px !important;
}

.yoo-users-search-wrapper .dashicons {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8f94;
  font-size: 18px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
}

.yoo-users-search-input {
  width: 100%;
  padding: 8px 12px 8px 38px !important;
  border: 1px solid #d3d3d3 !important;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  line-height: 1.5;
  height: 36px;
}


.yoo-users-search-input:focus,
.yoo-users-search-input:focus-visible {
  outline: none !important;
  border: 1px solid var(--_yp-primary, #eda934) !important;
  box-shadow: 0 0 0 1px var(--_yp-primary, #eda934) !important;
}

.yoo-users-hero__description-section {
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: auto;
}

.yoo-users-hero__description-section p {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--yp-text);
  display: inline;
  padding-top: 2px;
}

.yoo-users-hero__description-section p strong {
  font-weight: 600;
  color: var(--_yp-primary, #eda934);
}

/* Metrics Toggle Button */
.yoo-users-metrics-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-top: 12px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 12px;
  color: #646970;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yoo-users-metrics-toggle:hover {
  background: #e8e8e8;
  border-color: #c3c4c7;
}

.yoo-users-metrics-toggle .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.yoo-users-metrics-toggle.is-expanded .dashicons {
  transform: rotate(180deg);
}

.yoo-users-add-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Force white color for Add User button text and icon */
.yoo-users-add-btn,
.yoo-users-add-btn .dashicons {
  color: #fff !important;
  text-decoration: none !important;
}

.yoo-users-add-btn:hover,
.yoo-users-add-btn:hover .dashicons {
  color: #fff !important;
  text-decoration: none !important;
}

/* Add User Button */
.yoo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  height: 36px;
  box-sizing: border-box;
}

.yoo-button--primary {
  background: var(--_yp-primary, #eda934);
  color: #fff !important;
  border-color: var(--_yp-primary, #eda934);
}

.yoo-button--primary:hover {
  background: color-mix(in srgb, var(--_yp-primary, #eda934) 88%, #000);
  border-color: color-mix(in srgb, var(--_yp-primary, #eda934) 88%, #000);
  color: #fff !important;
  text-decoration: none;
}

.yoo-button--primary * {
  color: #fff !important;
}

.yoo-button--primary:hover * {
  color: #fff !important;
}

.yoo-button--ghost {
  background: #fff;
  color: #2c3338;
  border-color: #dcdcde;
}

.yoo-button--ghost:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  color: #2c3338;
  text-decoration: none;
}

.yoo-button .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Metrics */
.yoo-users-hero__metrics {
  display: none; /* Hidden by default */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f1;
  animation: slideDown 0.3s ease;
}

.yoo-users-hero__metrics.is-visible {
  display: grid;
}

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

.yoo-users-metric {
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dcdcde;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.yoo-users-metric__icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
}

.yoo-users-metric__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f6f7f7;
  border: 1px solid #e0e0e0;
}

.yoo-users-metric__icon .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--_yp-primary, #eda934);
}

.yoo-users-metric__value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--yp-text);
  line-height: 1;
  margin-bottom: 4px;
}

.yoo-users-metric__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.yoo-users-metric__label {
  display: block;
  font-size: 12px;
  color: var(--yp-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.yoo-users-metric__subtext {
  display: block;
  font-size: 13px;
  color: #8c8f94;
  font-weight: 400;
}

/* Users Content Container */
#yoo-users-content {
  transition: opacity 0.3s ease;
}

/* ----------------------------------------------------------------------------
   Toolbar & Filters
   ---------------------------------------------------------------------------- */
.yoo-users-content-section {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Bulk Actions Bar */
.yoo-bulk-actions-bar {
  background: #fffdf8;
  border: 1px solid #ffe9c1;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.yoo-bulk-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yoo-bulk-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yoo-selected-count {
  font-size: 13px;
  color: var(--yp-text);
  font-weight: 500;
}

.yoo-bulk-select {
  padding: 6px 32px 6px 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  min-width: 150px;
}

.yoo-bulk-select:focus {
  border-color: var(--_yp-primary, #eda934);
  box-shadow: 0 0 0 1px var(--_yp-primary, #eda934);
  outline: none;
}

/* Bulk Apply Button */
#yoo-bulk-apply,
.yoo-bulk-apply {
  color: #fff !important;
}

#yoo-bulk-apply *,
.yoo-bulk-apply * {
  color: #fff !important;
}

#yoo-bulk-apply:hover,
.yoo-bulk-apply:hover {
  color: #fff !important;
}

#yoo-bulk-apply:hover *,
.yoo-bulk-apply:hover * {
  color: #fff !important;
}

/* User Checkbox */
.yoo-user-checkbox {
  position: absolute;
  top: 12px;
  right: 48px;
  width: 16px;
  height: 16px;
  opacity: 0;
  z-index: 11;
  cursor: pointer;
  margin: 0;
}

.yoo-user-checkbox-label {
  position: absolute;
  top: 12px;
  right: 48px;
  width: 16px;
  height: 16px;
  border: 2px solid #8c8f94;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  z-index: 11;
  transition: all 0.2s ease;
  opacity: 0;
  margin: 0;
}

.yoo-user-card:hover .yoo-user-checkbox-label {
  opacity: 1;
  border-color: var(--_yp-primary, #eda934);
}

.yoo-user-card.selected .yoo-user-checkbox-label {
  opacity: 1;
}

.yoo-user-checkbox:checked + .yoo-user-checkbox-label {
  background: var(--_yp-primary, #eda934);
  border-color: var(--_yp-primary, #eda934);
  opacity: 1;
}

.yoo-user-checkbox:checked + .yoo-user-checkbox-label::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.yoo-user-card.selected {
  border-color: var(--_yp-primary, #eda934);
  box-shadow: 0 0 0 1px var(--_yp-primary, #eda934);
}

/* Checkbox for select all */
.yoo-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Confirm Modal */
.yoo-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.yoo-confirm-modal {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.yoo-confirm-header {
  padding: 24px 24px 16px;
  border-bottom: 2px solid;
  display: flex;
  align-items: center;
  gap: 12px;
}

.yoo-confirm-header .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.yoo-confirm-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--yp-text);
}

.yoo-confirm-body {
  padding: 20px 24px;
}

.yoo-confirm-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--yp-text);
}

.yoo-confirm-body p strong {
  color: var(--yp-text);
  font-weight: 600;
}

.yoo-confirm-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.yoo-users-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f1;
}

.yoo-users-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.yoo-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  color: #2c3338;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.yoo-filter-chip:hover {
  background: #fff;
  border-color: var(--_yp-primary, #eda934);
  color: var(--_yp-primary, #eda934);
  text-decoration: none;
}

.yoo-filter-chip.is-active {
  background: var(--_yp-primary, #eda934);
  border-color: var(--_yp-primary, #eda934);
  color: #fff !important;
}

.yoo-filter-chip.is-active * {
  color: #fff !important;
}

.yoo-filter-chip.is-active:hover {
  color: #fff !important;
}

.yoo-filter-chip.is-active:hover * {
  color: #fff !important;
}

.yoo-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 600;
}

.yoo-filter-chip.is-active .yoo-filter-count {
  background: rgba(255, 255, 255, 0.25);
}

.yoo-users-sorts {
  display: flex;
  gap: 12px;
  align-items: center;
}

.yoo-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #dcdcde;
  color: var(--yp-text);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.yoo-clear-filters:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  color: #2c3338;
  text-decoration: none;
}

.yoo-clear-filters .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.yoo-sort-select {
  padding: 6px 28px 6px 12px;
  border-radius: 4px;
  border: 1px solid #8c8f94;
  background: #fff;
  font-size: 13px;
  color: #2c3338;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L1 4H11L6 9Z' fill='%23646970'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yoo-sort-select:focus {
  outline: none;
  border-color: var(--_yp-primary, #eda934);
  box-shadow: 0 0 0 1px var(--_yp-primary, #eda934);
}

.yoo-sort-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ----------------------------------------------------------------------------
   Users Grid
   ---------------------------------------------------------------------------- */
.yoo-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* User Card */
.yoo-user-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
}

.yoo-user-card:hover {
  border-color: #8c8f94;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.yoo-user-edit-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  color: var(--yp-text);
  text-decoration: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yoo-user-card:hover .yoo-user-edit-icon {
  opacity: 1;
}

.yoo-user-card.selected .yoo-user-edit-icon {
  opacity: 1;
}

.yoo-user-edit-icon:hover {
  background: var(--_yp-primary, #eda934) !important;
  border-color: var(--_yp-primary, #eda934) !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.yoo-user-edit-icon:hover .dashicons {
  color: #fff !important;
}

.yoo-user-edit-icon .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: inherit;
}

.yoo-user-card__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.yoo-user-avatar {
  position: relative;
  flex-shrink: 0;
}

.yoo-user-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
}

.yoo-user-online-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00a32a;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.yoo-user-heading {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.yoo-user-heading h2 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.yoo-user-heading a {
  color: #2c3338;
  text-decoration: none;
  transition: color 0.15s ease;
  display: block;
  word-break: break-word;
  overflow-wrap: break-word;
}

.yoo-user-heading a:hover {
  color: var(--_yp-primary, #eda934);
}

.yoo-user-role {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f0f0f1;
  color: var(--yp-text);
}

.yoo-user-role--administrator {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.yoo-user-role--editor {
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
}

.yoo-user-role--author {
  background: rgba(236, 72, 153, 0.1);
  color: #be185d;
}

.yoo-user-role--contributor {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.yoo-user-role--subscriber {
  background: rgba(34, 197, 94, 0.1);
  color: #047857;
}

.yoo-user-meta-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--yp-text);
  margin-top: 8px;
  flex-wrap: wrap;
  word-break: break-word;
}

.yoo-user-meta-inline .dot {
  color: #c3c4c7;
}

.yoo-user-meta {
  display: grid;
  gap: 12px;
  margin: 0;
  font-size: 13px;
}

.yoo-user-meta > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.yoo-user-meta dt {
  font-weight: 600;
  color: var(--yp-text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}

.yoo-user-meta dt::after {
  content: ':';
  margin-left: 2px;
}

.yoo-user-meta dt .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: var(--_yp-primary, #eda934);
}

.yoo-user-meta dd {
  margin: 0;
  color: var(--yp-text);
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
  min-width: 0;
}

.yoo-user-meta a {
  color: var(--_yp-primary, #eda934);
  text-decoration: none;
}

.yoo-user-meta a:hover {
  text-decoration: underline;
}


/* ----------------------------------------------------------------------------
   Pagination
   ---------------------------------------------------------------------------- */
.yoo-users-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.yoo-users-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #dcdcde;
  background: #fff;
  color: #2c3338;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.yoo-users-pagination a:hover {
  background: #f6f7f7;
  border-color: #8c8f94;
  color: #2c3338;
  text-decoration: none;
}

.yoo-users-pagination a.is-active {
  background: var(--_yp-primary, #eda934);
  border-color: var(--_yp-primary, #eda934);
  color: #fff;
}

/* ----------------------------------------------------------------------------
   Empty State
   ---------------------------------------------------------------------------- */
.yoo-users-empty {
  text-align: center;
  padding: 60px 24px;
}

.yoo-empty-illustration {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #f0f0f1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yoo-empty-illustration::before {
  content: "\f110";
  font-family: dashicons;
  font-size: 40px;
  color: #c3c4c7;
}

.yoo-users-empty h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--yp-text);
}

.yoo-users-empty p {
  margin: 0 0 20px 0;
  color: var(--yp-text);
  font-size: 14px;
}

/* ----------------------------------------------------------------------------
   Create User Page
   ---------------------------------------------------------------------------- */
.yoo-user-create-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.yoo-user-form-panel,
.yoo-user-side-panel {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.yoo-user-form-header p {
  margin: 8px 0 24px 0;
  color: var(--yp-text);
  font-size: 14px;
}

.yoo-user-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.yoo-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.yoo-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yoo-form-field label {
  font-weight: 600;
  font-size: 13px;
  color: var(--yp-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.yoo-form-field label .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #8c8f94 !important;
}

/* Override Focus Mode for field label icons */
body.yoo-focus .yoo-form-field label .dashicons {
  color: #8c8f94 !important;
}

.yoo-profile-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yoo-profile-panel h2 .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--_yp-primary, #eda934);
}

.yoo-form-field input,
.yoo-form-field select,
.yoo-form-field textarea {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yoo-form-field input:focus,
.yoo-form-field select:focus,
.yoo-form-field textarea:focus {
  outline: none;
  border-color: var(--_yp-primary, #eda934);
  box-shadow: 0 0 0 2px rgba(238, 180, 78, 0.15);
}

.yoo-form-field--full {
  grid-column: 1 / -1;
}

.yoo-form-inline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.yoo-form-inline input {
  flex: 1;
  min-width: 200px;
}

.yoo-app-password-form .yoo-form-inline-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.yoo-app-password-form .yoo-form-inline-wrapper input {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.yoo-app-passwords-section {
  border-top: 1px solid #f0f0f1;
  padding-top: 16px;
  margin-top: 16px;
}

.yoo-password-fields-inline {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 0;
}

.yoo-password-fields-inline .yoo-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.yoo-password-fields-inline .yoo-form-field > label {
  margin: 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--yp-text);
  line-height: 1.4;
}

.yoo-password-fields-inline .yoo-form-field > input {
  width: 100%;
  margin: 0;
}

.yoo-password-button-wrapper {
  grid-column: 3;
  display: flex;
  align-items: center;
  align-self: center;
  margin-bottom: 0;
  padding-bottom: 0;
  margin-top:25px;
}

.yoo-field-hint {
  margin: 0;
  font-size: 12px;
  color: var(--yp-text);
}

.yoo-field-feedback {
  font-size: 12px;
  color: #d63638;
  margin-top: 4px;
}

.yoo-form-divider {
  height: 1px;
  background: #f0f0f1;
  margin: 8px 0;
}

.yoo-password-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yoo-password-control {
  position: relative;
}

.yoo-password-control input {
  width: 100%;
  padding-right: 40px;
}

.yoo-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--yp-text);
  padding: 4px;
}

.yoo-password-toggle:hover {
  color: #2c3338;
}

.yoo-password-meter {
  height: 4px;
  background: #f0f0f1;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.yoo-password-meter__bar {
  height: 100%;
  width: 0%;
  background: #d63638;
  transition: width 0.3s ease, background 0.3s ease;
}

.yoo-password-meter[data-strength="weak"] .yoo-password-meter__bar {
  width: 33%;
  background: #d63638;
}

.yoo-password-meter[data-strength="medium"] .yoo-password-meter__bar {
  width: 66%;
  background: #f0b849;
}

.yoo-password-meter[data-strength="strong"] .yoo-password-meter__bar {
  width: 100%;
  background: #00a32a;
}

.yoo-password-meter__label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--yp-text);
}

.yoo-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #2c3338;
}

.yoo-checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.yoo-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f1;
}

.yoo-side-card {
  padding: 20px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  margin-bottom: 16px;
}

.yoo-side-card:last-child {
  margin-bottom: 0;
}

.yoo-side-card h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--yp-text);
}

.yoo-side-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--yp-text);
  font-size: 13px;
  line-height: 1.6;
}

.yoo-side-checklist {
  list-style: none;
  padding-left: 0;
}

.yoo-side-checklist li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}

.yoo-side-checklist li::before {
  content: "\f147";
  font-family: dashicons;
  position: absolute;
  left: 0;
  color: #00a32a;
  font-size: 16px;
}

/* ----------------------------------------------------------------------------
   Profile Page
   ---------------------------------------------------------------------------- */
.yoo-profile-hero {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.yoo-profile-hero__main {
  flex: 1;
  min-width: 0;
}

.yoo-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--yp-text);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.15s ease;
}

.yoo-breadcrumb:hover {
  color: var(--_yp-primary, #eda934);
}

.yoo-profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.yoo-profile-avatar {
  flex-shrink: 0;
}

.yoo-profile-avatar {
  position: relative;
  flex-shrink: 0;
}

.yoo-profile-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: block;
}

.yoo-profile-online-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.yoo-profile-online-badge.is-online {
  background: #00a32a;
}

.yoo-profile-online-badge.is-offline {
  background: #d63638;
}

.yoo-profile-info {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.yoo-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.yoo-profile-name {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--yp-text);
  line-height: 1.2;
}

.yoo-profile-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.yoo-role-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f0f0f1;
  color: var(--yp-text);
}

.yoo-profile-info-wrapper {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin-top: 0;
  align-items: flex-start;
  width: auto;
  overflow: visible;
}

.yoo-profile-details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  width: auto;
  max-width: 350px;
}

.yoo-profile-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #2c3338;
  line-height: 1.5;
}

.yoo-profile-detail-item .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--_yp-primary, #eda934);
  flex-shrink: 0;
}

.yoo-profile-detail-item a {
  color: var(--_yp-primary, #eda934);
  text-decoration: none;
  transition: text-decoration 0.15s ease;
}

.yoo-profile-detail-item a:hover {
  text-decoration: underline;
}

.yoo-profile-detail-date {
  display: block;
  font-size: 12px;
  color: var(--yp-text);
  margin-left: 26px;
  margin-top: 2px;
}

.yoo-profile-insights-separator {
  width: 1px;
  height: auto;
  background: #e0e0e0;
  margin: 0 24px;
  flex-shrink: 0;
  align-self: stretch;
}

.yoo-profile-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
  padding-top: 0;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.yoo-profile-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.yoo-profile-insight-item:hover {
  background: #f5f5f5;
}

.yoo-profile-insight-item .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--_yp-primary, #eda934);
  flex-shrink: 0;
  margin-top: 2px;
}

.yoo-profile-insight-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.yoo-profile-insight-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--yp-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yoo-profile-insight-content strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--yp-text);
  line-height: 1.2;
}

.yoo-profile-insight-content small {
  font-size: 12px;
  color: var(--yp-text);
  line-height: 1.4;
}

.yoo-profile-hero__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.yoo-profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  margin-top: 24px;
  padding: 0;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.yoo-profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.yoo-profile-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 1024px) {
  .yoo-profile-layout {
    grid-template-columns: 1fr;
  }
}

.yoo-profile-panel {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.yoo-profile-panel h2 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--yp-text);
}

.yoo-profile-details-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.yoo-profile-detail-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f1;
}

.yoo-profile-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.yoo-profile-detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yp-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yoo-profile-detail-label .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #8c8f94 !important;
}

/* Override Focus Mode for profile detail label icons */
body.yoo-focus .yoo-profile-detail-label .dashicons {
  color: #8c8f94 !important;
}

.yoo-profile-detail-value {
  font-size: 14px;
  color: #2c3338;
  line-height: 1.5;
  word-break: break-word;
}

.yoo-profile-detail-value a {
  color: var(--_yp-primary, #eda934);
  text-decoration: none;
  transition: text-decoration 0.15s ease;
}

.yoo-profile-detail-value a:hover {
  text-decoration: underline;
}

.yoo-profile-form .yoo-form-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.yoo-profile-form .yoo-form-section {
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

.yoo-profile-form .yoo-form-section--left {
  padding-left: 0;
  padding-right: 16px;
}

.yoo-profile-form .yoo-form-section--right {
  padding-left: 16px;
  padding-right: 0;
}

.yoo-profile-form .yoo-form-section {
  display: flex;
  flex-direction: column;
}

.yoo-profile-form .yoo-form-section--left .yoo-form-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.yoo-profile-form .yoo-form-section--right .yoo-form-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.yoo-profile-form .yoo-form-field {
  margin-bottom: 0;
}

.yoo-password-grid .yoo-form-field .description {
  margin-top: 4px;
  margin-bottom: 0;
}

.yoo-profile-form .description {
  margin-top: 6px;
  font-size: 13px;
  color: var(--yp-text);
  line-height: 1.5;
}

.yoo-profile-form .required {
  color: #d63638;
}

.yoo-app-passwords,
.yoo-sessions {
  margin-top: 24px;
}

.yoo-app-passwords table,
.yoo-sessions table {
  margin-top: 12px;
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.yoo-app-passwords table th,
.yoo-sessions table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  background: #f9f9f9;
  border-bottom: 2px solid #dcdcde;
}

.yoo-app-passwords table td,
.yoo-sessions table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f1;
  word-break: break-word;
  max-width: 200px;
}

.yoo-app-passwords .button-link.delete {
  color: #b32d2e;
}

.yoo-app-passwords .button-link.delete:hover {
  color: #8a2424;
}

/* ----------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .yoo-user-create-layout {
    grid-template-columns: 1fr;
  }

  .yoo-users-hero__metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 1024px) {
  .yoo-profile-info-wrapper {
    flex-direction: column;
  }

  .yoo-profile-insights-separator {
    width: 100%;
    height: 1px;
    margin: 20px 0;
  }

  .yoo-profile-insights {
    grid-template-columns: 1fr;
    min-width: auto;
  }

  .yoo-profile-form .yoo-form-sections {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
  }
  
  .yoo-profile-form .yoo-form-section {
    padding: 0 !important;
  }
  
  .yoo-profile-form .yoo-form-section--left,
  .yoo-profile-form .yoo-form-section--right {
    padding: 0 !important;
  }
}

@media (max-width: 768px) {
  .yooadmin-users-page,
  .yooadmin-user-create {
    padding: 16px;
  }
  
  .yooadmin-user-profile {
    padding: 0;
  }

  .yoo-users-hero {
    padding: 20px;
  }

  .yoo-users-hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .yoo-users-hero__top-row {
    flex-wrap: wrap;
  }

  .yoo-users-search-wrapper {
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 12px;
  }

  .yoo-users-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 16px;
  }

  .yoo-users-filters {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  
  .yoo-users-filters::-webkit-scrollbar {
    display: none;
  }
  
  .yoo-filter-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .yoo-users-sorts {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .yoo-users-sorts::-webkit-scrollbar {
    display: none;
  }

  .yoo-users-grid {
    grid-template-columns: 1fr;
  }

  .yoo-profile-hero {
    padding: 16px 16px;
    flex-direction: column;
    margin: 0;
  }

  .yoo-profile-identity {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    text-align: center;
  }
  
  .yoo-profile-avatar {
    width: 100px;
    height: 100px;
  }
  
  .yoo-profile-info {
    align-items: center;
    width: 100%;
  }
  
  .yoo-profile-name {
    font-size: 22px;
  }
  
  .yoo-profile-role {
    font-size: 12px;
  }

  .yoo-profile-hero__actions {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
  }

  .yoo-profile-hero__actions .yoo-button {
    flex: 1 1 auto;
    min-width: 140px;
  }
  
  .yoo-profile-info-wrapper {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    width: 100%;
  }
  
  .yoo-profile-details {
    width: 100%;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
  }
  
  .yoo-profile-detail-item {
    font-size: 13px;
    padding: 8px 0;
  }
  
  .yoo-profile-detail-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
  }
  
  .yoo-profile-insights {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 8px;
    margin-top: 16px;
  }
  
  .yoo-profile-insight-item {
    padding: 12px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .yoo-profile-insight-item .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
  }
  
  .yoo-profile-insight-label {
    font-size: 10px;
  }
  
  .yoo-profile-insight-content strong {
    font-size: 16px;
  }
  
  .yoo-profile-insights-separator {
    display: none;
  }
  
  .yoo-profile-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
    margin: 0 16px;
  }
  
  .yoo-profile-panel {
    padding: 16px;
    margin: 0;
  }
  
  .yoo-profile-panel h2 {
    font-size: 15px;
  }

  .yoo-profile-panels {
    grid-template-columns: 1fr;
  }

  .yoo-form-grid {
    grid-template-columns: 1fr;
  }

  .yoo-password-fields-inline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .yoo-password-fields-inline .yoo-form-field {
    min-width: 100%;
    width: 100%;
  }
  
  .yoo-password-button-wrapper {
    width: 100%;
  }

  .yoo-password-button-wrapper {
    align-self: stretch;
  }

  .yoo-password-button-wrapper button {
    width: 100%;
  }
  
  /* Sessions & App Passwords tables */
  .yoo-app-passwords,
  .yoo-sessions {
    margin-top: 20px;
  }
  
  .yoo-app-passwords table,
  .yoo-sessions table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 11px;
    width: 100%;
  }
  
  .yoo-app-passwords table thead,
  .yoo-sessions table thead {
    display: table;
    width: 100%;
  }
  
  .yoo-app-passwords table tbody,
  .yoo-sessions table tbody {
    display: table;
    width: 100%;
  }
  
  .yoo-app-passwords table th,
  .yoo-sessions table th {
    padding: 8px 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  
  .yoo-app-passwords table td,
  .yoo-sessions table td {
    padding: 8px 6px;
    font-size: 11px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Make Actions column not wrap */
  .yoo-app-passwords table td:last-child,
  .yoo-sessions table td:last-child {
    white-space: nowrap;
    min-width: 60px;
  }
}
