.wf-admin-wrap {
  --wf-admin-accent: #0b6a78;
  --wf-admin-accent-hover: #0f766e;
  --wf-admin-bg: #f8fafc;
  --wf-admin-card-bg: #ffffff;
  --wf-admin-border: #e2e8f0;
  --wf-admin-text: #1e293b;
  --wf-admin-text-muted: #64748b;
  --wf-admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --wf-admin-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
  --wf-admin-radius: 12px;
  --wf-admin-radius-sm: 8px;

  margin: 20px 20px 0 0;
  max-width: 900px;
}

.wf-admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--wf-admin-border);
}

.wf-admin-header-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--wf-admin-accent) 0%, #14919b 100%);
  border-radius: var(--wf-admin-radius);
  color: #fff;
  font-size: 24px;
}

.wf-admin-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--wf-admin-text);
}

.wf-admin-header p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--wf-admin-text-muted);
}

.wf-admin-card {
  background: var(--wf-admin-card-bg);
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius);
  box-shadow: var(--wf-admin-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.wf-admin-card-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--wf-admin-border);
}

.wf-admin-card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--wf-admin-text);
}

.wf-admin-card-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--wf-admin-text-muted);
}

.wf-admin-card-body {
  padding: 20px;
}

.wf-admin-card-body .form-table {
  margin: 0;
}

.wf-admin-card-body .form-table th {
  padding: 14px 16px 14px 0;
  width: 240px;
  vertical-align: top;
}

.wf-admin-card-body .form-table td {
  padding: 14px 0;
  vertical-align: top;
}

.wf-admin-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--wf-admin-text);
  margin-bottom: 6px;
}

.wf-admin-label-hint {
  display: block;
  font-size: 12px;
  color: var(--wf-admin-text-muted);
  margin-top: 4px;
}

.wf-admin-input {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  background: #fff;
  color: var(--wf-admin-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-admin-input:focus {
  outline: none;
  border-color: var(--wf-admin-accent);
  box-shadow: 0 0 0 3px rgba(11, 106, 120, 0.1);
}

.wf-admin-input-small {
  width: 100px;
  max-width: none;
}

.wf-admin-input-color {
  width: 44px;
  height: 36px;
  padding: 3px;
  cursor: pointer;
  border: 2px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-admin-input-color:hover {
  border-color: var(--wf-admin-accent);
}

.wf-admin-input-color:focus {
  outline: none;
  border-color: var(--wf-admin-accent);
  box-shadow: 0 0 0 3px rgba(11, 106, 120, 0.12);
}

.wf-admin-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-admin-color-preview {
  width: 40px;
  height: 36px;
  border-radius: var(--wf-admin-radius-sm);
  border: 2px solid var(--wf-admin-border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease;
  flex-shrink: 0;
}

.wf-admin-color-preview:hover {
  border-color: var(--wf-admin-accent);
}

.wf-admin-color-hex {
  font-family: monospace;
  font-size: 13px;
  color: var(--wf-admin-text-muted);
  background: #f8fafc;
  padding: 6px 10px;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  letter-spacing: 0.02em;
  user-select: all;
}

.wf-admin-input-color-hex {
  width: 80px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: monospace;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  background: #f8fafc;
  color: var(--wf-admin-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-admin-input-color-hex:focus {
  outline: none;
  border-color: var(--wf-admin-accent);
  box-shadow: 0 0 0 3px rgba(11, 106, 120, 0.12);
}

.wf-admin-select {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  background: #fff;
  color: var(--wf-admin-text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-admin-select:focus {
  outline: none;
  border-color: var(--wf-admin-accent);
  box-shadow: 0 0 0 3px rgba(11, 106, 120, 0.1);
}

.wf-admin-textarea {
  width: 100%;
  max-width: 600px;
  padding: 12px;
  font-size: 13px;
  font-family: monospace;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  background: #f8fafc;
  color: var(--wf-admin-text);
  resize: vertical;
  min-height: 120px;
}

.wf-admin-textarea:focus {
  outline: none;
  border-color: var(--wf-admin-accent);
  box-shadow: 0 0 0 3px rgba(11, 106, 120, 0.1);
}

.wf-admin-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-admin-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--wf-admin-accent);
}

.wf-admin-checkbox-label {
  font-size: 14px;
  color: var(--wf-admin-text);
}

.wf-admin-submit-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--wf-admin-border);
}

.wf-admin-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--wf-admin-accent) 0%, #14919b 100%);
  border: none;
  border-radius: var(--wf-admin-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(11, 106, 120, 0.25);
}

.wf-admin-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 106, 120, 0.3);
}

.wf-admin-toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-admin-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.wf-admin-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wf-admin-toggle:hover {
  border-color: var(--wf-admin-accent);
  background: #fff;
}

.wf-admin-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--wf-admin-accent);
}

.wf-admin-toggle input[type="checkbox"]:checked + span {
  color: var(--wf-admin-accent);
  font-weight: 500;
}

.wf-admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.wf-admin-stat-card {
  background: var(--wf-admin-card-bg);
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius);
  padding: 20px;
  box-shadow: var(--wf-admin-shadow);
}

.wf-admin-stat-card-label {
  font-size: 13px;
  color: var(--wf-admin-text-muted);
  margin-bottom: 4px;
}

.wf-admin-stat-card-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--wf-admin-text);
}

.wf-admin-stat-card-value--small {
  font-size: 16px;
}

.wf-admin-table {
  width: 100%;
  border-collapse: collapse;
}

.wf-admin-table th,
.wf-admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--wf-admin-border);
}

.wf-admin-table th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: var(--wf-admin-text);
}

.wf-admin-table td {
  font-size: 14px;
  color: var(--wf-admin-text);
}

.wf-admin-table tr:hover td {
  background: #fafbfc;
}

.wf-admin-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(11, 106, 120, 0.1);
  color: var(--wf-admin-accent);
}

.wf-admin-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--wf-admin-text-muted);
}

.wf-admin-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.wf-admin-card-body-tight {
  padding: 0;
}

.wf-admin-card-body-compact {
  padding: 16px;
}

.wf-admin-success-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #6ee7b7;
}

.wf-admin-success-text {
  margin: 0;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-admin-section-spacer {
  margin-top: 24px;
}

.wf-admin-divider {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--wf-admin-border);
}

.wf-admin-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--wf-admin-text);
}

.wf-admin-help {
  margin-top: 8px;
  font-size: 12px;
  color: var(--wf-admin-text-muted);
}

.wf-admin-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: #dc2626;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: var(--wf-admin-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wf-admin-reset-btn:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.wf-admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.wf-admin-grid-2 .form-table th {
  width: auto;
}

@media (max-width: 768px) {
  .wf-admin-grid-2 {
    grid-template-columns: 1fr;
  }

  .wf-admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .wf-admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Filter ordering sortable */
#cscf-filter-sortable {
  list-style: none;
  padding: 0;
  max-width: 400px;
}

.cscf-sortable-item {
  padding: 12px 16px;
  margin-bottom: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: grab;
  font-weight: 500;
}

.cscf-sortable-item:hover {
  border-color: var(--wf-admin-accent);
  background: #faf5ff;
}

.wf-admin-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--wf-admin-border);
  border-radius: var(--wf-admin-radius);
  background: var(--wf-admin-card-bg);
  box-shadow: var(--wf-admin-shadow);
  text-decoration: none;
  color: var(--wf-admin-text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-admin-link-card:hover {
  transform: translateY(-2px);
  border-color: var(--wf-admin-accent);
  box-shadow: var(--wf-admin-shadow-lg);
}

.wf-admin-link-card strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--wf-admin-text);
}

.wf-admin-link-card span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--wf-admin-text-muted);
}
