.theme-toggle-option span[aria-hidden="true"] {
  font-size: 1.1rem;
}
.theme-toggle-option span:first-child {
  font-size: 0.9rem;
  line-height: 1;
}
[data-theme="dark"] .theme-toggle {
  background: rgba(7, 11, 27, 0.9);
  border-color: rgba(96, 116, 153, 0.4);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
}

[data-theme="dark"] .theme-toggle-option {
  color: rgba(226, 232, 240, 0.65);
}

[data-theme="dark"] .theme-toggle-option.is-active {
  color: #f8fafc;
}
.theme-toggle-option span[aria-hidden="true"] {
  font-size: 1rem;
}
[data-theme="dark"] .theme-toggle-highlight--light {
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

:root {
  color-scheme: light dark;
}

:root {
  color-scheme: light dark;
}

[data-theme="dark"] {
  --bg-body: #020617;
  --bg-panel: rgba(2, 6, 23, 0.92);
  --bg-surface: rgba(15, 23, 42, 0.65);
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5f5;
  --border-color: rgba(148, 163, 184, 0.35);
  --accent-color: #6366f1;
  --panel-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
}

[data-theme="light"] {
  --bg-body: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.9);
  --bg-surface: rgba(248, 250, 252, 0.9);
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --border-color: rgba(203, 213, 225, 0.8);
  --accent-color: #4f46e5;
  --panel-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] .theme-toggle-button,
[data-theme="dark"] .theme-toggle-button {
  cursor: pointer;
}

[data-theme="light"] main,
[data-theme="dark"] main {
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

[data-theme="dark"] main {
  background-color: transparent;
  color: inherit;
}

[data-theme="dark"] .bg-white {
  background-color: rgba(15, 23, 42, 0.9) !important;
}

[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-indigo-50 {
  background-color: rgba(30, 41, 59, 0.8) !important;
}

[data-theme="dark"] .bg-indigo-100 {
  background-color: rgba(55, 48, 163, 0.2) !important;
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-indigo-500,
[data-theme="dark"] .text-indigo-600,
[data-theme="dark"] .text-indigo-700 {
  color: #a5b4fc !important;
}

[data-theme="dark"] .text-gray-400 {
  color: #94a3b8 !important;
}

[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-green-500,
[data-theme="dark"] .border-red-500,
[data-theme="dark"] .border-indigo-100 {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .shadow-md,
[data-theme="dark"] .shadow-lg {
  box-shadow: var(--panel-shadow) !important;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: rgba(15, 23, 42, 0.95) !important;
  color: var(--text-primary) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: rgba(148, 163, 184, 0.7) !important;
}

[data-theme="dark"] .security-scan-button {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.45) !important;
}

[data-theme="dark"] a {
  color: #c7d2fe;
}

[data-theme="dark"] a:hover {
  color: #e0e7ff;
}

[data-theme="dark"] .bg-indigo-600 {
  background-color: #3730a3 !important;
}

[data-theme="dark"] .bg-green-100 {
  background-color: rgba(22, 163, 74, 0.2) !important;
}

[data-theme="dark"] .bg-red-100 {
  background-color: rgba(220, 38, 38, 0.2) !important;
}

[data-theme="dark"] .text-green-600,
[data-theme="dark"] .text-green-700 {
  color: #4ade80 !important;
}

[data-theme="dark"] .text-red-700 {
  color: #fca5a5 !important;
}

[data-theme="dark"] code,
[data-theme="dark"] pre {
  background-color: rgba(15, 23, 42, 0.7) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] table,
[data-theme="dark"] th,
[data-theme="dark"] td {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-b,
[data-theme="dark"] .border-t,
[data-theme="dark"] .border-l,
[data-theme="dark"] .border-r {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .bg-gray-200,
[data-theme="dark"] .bg-gray-300 {
  background-color: rgba(51, 65, 85, 0.6) !important;
}

[data-theme="dark"] button:hover,
[data-theme="dark"] .hover\:bg-gray-100:hover,
[data-theme="dark"] .hover\:bg-gray-200:hover,
[data-theme="dark"] .hover\:bg-gray-300:hover {
  background-color: rgba(79, 70, 229, 0.2) !important;
}

[data-theme="dark"] .text-gray-500 span,
[data-theme="dark"] .text-gray-600 span,
[data-theme="dark"] .text-gray-700 span,
[data-theme="dark"] .text-gray-800 span {
  color: inherit !important;
}

[data-theme="dark"] .text-sm,
[data-theme="dark"] .text-lg,
[data-theme="dark"] .text-xl,
[data-theme="dark"] .text-2xl,
[data-theme="dark"] .text-3xl,
[data-theme="dark"] .text-4xl,
[data-theme="dark"] .text-5xl {
  color: inherit;
}

/* Utility overrides for dark theme */
/* Utility overrides for dark theme */
[data-theme="dark"] .bg-white\/90 {
  background-color: var(--bg-panel) !important;
}

[data-theme="dark"] .border-gray-200 {
  border-color: rgba(148, 163, 184, 0.35) !important;
}

[data-theme="dark"] .text-sm.text-gray-500,
[data-theme="dark"] .text-xs.text-gray-500 {
  color: #cbd5f5 !important;
}

[data-theme="dark"] .text-gray-500 a,
[data-theme="dark"] .text-gray-600 a {
  color: #c7d2fe !important;
}

[data-theme="dark"] .text-gray-500 a:hover,
[data-theme="dark"] .text-gray-600 a:hover {
  color: #e0e7ff !important;
}

[data-theme="dark"] .bg-indigo-600:hover {
  background-color: #4c1d95 !important;
}

[data-theme="dark"] .hover\:text-indigo-800:hover {
  color: #e0e7ff !important;
}

[data-theme="dark"] .hover\:underline:hover {
  color: #e0e7ff !important;
}

[data-theme="dark"] .text-gray-500 span {
  color: inherit;
}

[data-theme="dark"] .text-gray-700 strong,
[data-theme="dark"] .text-gray-600 strong {
  color: inherit;
}

[data-theme="dark"] .bg-white .text-gray-700 {
  color: var(--text-primary) !important;
}

.theme-toggle-wrapper {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  gap: 4px;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .theme-toggle {
  background: rgba(7, 11, 27, 0.9);
  border-color: rgba(96, 116, 153, 0.4);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
}

.theme-toggle-highlight {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 2px);
  border-radius: 9999px;
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.3s ease, width 0.3s ease, background 0.3s ease;
  will-change: transform, width;
}

.theme-toggle-highlight--dark {
  background: linear-gradient(135deg, #6366f1, #14b8a6);
}

.theme-toggle-option {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  border: none;
  border-radius: 9999px;
  padding: 6px 18px;
  background: transparent;
  color: #1f2937;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.theme-toggle-option:hover {
  color: #0f172a;
}

.theme-toggle-option.is-active {
  color: #0f172a;
}

[data-theme="dark"] .theme-toggle-option {
  color: rgba(226, 232, 240, 0.65);
}

[data-theme="dark"] .theme-toggle-option.is-active {
  color: #f8fafc;
}

.theme-toggle-option:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
