.concord-wrap {
  --background: #030712; /* gray-950 */
  --foreground: #f9fafb; /* gray-50 */
  --card: #040a1b; /* #030712 gray-950 + 2% lightness = #040a1b */
  --card-foreground: var(--foreground);
  --popover: var(--card);
  --popover-foreground: var(--foreground);
  --primary: #057bfa;
  --primary-foreground: #f9fafb;
  --primary-hover: #3796fb;
  --primary-transparent: rgba(5, 123, 250, 0.15);
  --secondary: #1f2937; /* gray-800 */
  --secondary-foreground: #f9fafb; /* gray-50 */
  --muted: #1f2937; /* gray-800 */
  --muted-foreground: #9ca3af; /* gray-400 */
  --accent: #057bfa;
  --accent-foreground: #f9fafb;
  --accent-hover: #6b7280;
  --accent-transparent: rgba(75, 85, 99, 0.15);
  --border: #1f2937; /* gray-800 */
  --input: #1f2937; /* gray-800 */
  --radius: 6px;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0 !important;
  padding: 0 !important;
  margin-left: -20px !important;
  width: calc(100% + 20px);
  min-height: calc(100vh - 32px);
  background: var(--background);
  color: var(--foreground);
}

/* Hide WordPress notices */
.notice,
.update-nag,
.updated,
.error {
  display: none !important;
}

body .concord-select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  width: 100%;
  max-width: 400px;
  margin: 0 !important;
  transition: all 0.2s ease;
  height: auto;
  appearance: none;
  background: transparent
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9fafb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1em;
  cursor: pointer;
  height: 2.25rem;
}

body .concord-select:focus {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-transparent);
}

body .concord-select:hover {
  border-color: var(--primary);
  color: var(--primary);
}

h3 {
  color: var(--foreground);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.875rem;
  margin: 0;
}

h4 {
  color: var(--foreground);
  font-weight: 600;
}

input[type="text"],
input[type="password"] {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  width: 100%;
  max-width: 400px;
  margin: 0 !important;
  transition: all 0.2s ease;
  height: 2.25rem;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-transparent);
}

/* Button styles */
button {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  height: 2.25rem;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  background-color: var(--primary-hover) !important;
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button.button-outline {
  background-color: transparent !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
}

button.button-outline:hover:not(:disabled) {
  background-color: transparent !important;
  border: 1px solid var(--primary-foreground) !important;
  color: var(--primary-foreground) !important;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

label {
  color: var(--foreground);
  font-weight: 600;
}

/* Navigation styles */
.concord-nav {
  background: var(--background);
  padding: 1rem 2rem;
  margin-bottom: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
}

.nav-logo {
  color: var(--foreground);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-item {
  display: flex;
  gap: 5px;
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 5px 0;
  transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}

.nav-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.external-link {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.external-link:hover {
  color: var(--primary);
}

/* Tabs styling */
.concord-tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
}

body .tab-btn {
  background: transparent !important;
  color: var(--muted-foreground) !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0 !important;
}

body .tab-btn:hover {
  color: var(--foreground) !important;
  transform: none;
  background-color: transparent !important;
}

body .tab-btn.active {
  border-bottom: 2px solid var(--primary) !important;
  color: var(--foreground) !important;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
}

/* Main container */
.concord-container {
  margin: 0 auto;
  padding: 2rem;
  background: transparent;
  box-shadow: none;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 2rem;
}

.card h3 {
  font-weight: 600;
  margin: 0;
}

.selection-details {
  margin: 1.5rem 0;
}

.selection-item {
  margin: 0.75rem 0;
  display: flex;
  align-items: center;
}

.selection-item .label {
  color: var(--muted-foreground);
  margin-right: 1rem;
  min-width: 120px;
}

.selection-item .value {
  color: var(--foreground);
  font-weight: 500;
}

/* Form elements */
.concord-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 440px;
}

/* Loading spinner */
.loading {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--primary-transparent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.75rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading.active {
  display: inline-block;
}

.concord-select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-transparent);
}

.concord-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.connected-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  background-color: #374151; /* gray-700 */
  border-radius: 24px;
  transition: all 0.2s ease;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.2s ease;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-label {
  color: var(--muted-foreground);
  margin-right: 0.75rem;
  font-size: 0.875rem;
}

.toggle-states span {
  position: absolute;
}

.toggle-states .on {
  left: 15%;
}

.toggle-states .off {
  left: 35%;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 24px;
  background-color: #374151; /* gray-700 */
  border-radius: 24px;
  transition: all 0.2s ease;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.2s ease;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(32px);
}

.toggle-label {
  color: var(--muted-foreground);
  margin-right: 0.75rem;
  font-size: 0.875rem;
}

.toggle-states {
  position: absolute;
  width: 100%;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  user-select: none;
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  top: 3px;
}

.toggle-states .on {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.toggle-states .off {
  opacity: 1;
  transition: opacity 0.2s ease;
}

input:checked + .toggle-slider .toggle-states .on {
  opacity: 1;
}

input:checked + .toggle-slider .toggle-states .off {
  opacity: 0;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem; /* gap-x-1 */
  white-space: nowrap;
  border-radius: var(--radius);
  padding: 0.2rem 0.4rem;
  font-weight: 500; /* font-medium */
  font-size: 0.875rem; /* text-sm */
  background-color: rgba(59, 130, 246, 0.1); /* dark:bg-blue-400/10 */
  color: var(--primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3); /* dark:ring-blue-400/30 */
}
