@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --rs-indigo: #ef4444; /* repurposed to red primary */
  --rs-indigo-600: #dc2626;
  --rs-gold: #b91c1c; /* keep but darker red accent */
  --rs-teal: #991b1b; /* muted red tone if referenced */
  --rs-red: #ef4444;
  --rs-red-dark: #b91c1c;
  --rs-text: #e6edf3; /* light text on dark bg */
  --rs-muted: #9ca3af;
  --rs-surface: #0b0f14; /* dark surface */
  --rs-border: rgba(255, 255, 255, 0.06); /* subtle light border on dark */
  --rs-success: #10b981;
  --rs-gradient-bg: linear-gradient(90deg, #000000, #000000);
  --rs-glass-bg: rgba(255, 255, 255, 0.03);
  --rs-glass-border: rgba(255, 255, 255, 0.06);
  --rs-input-focus-color: #ef4444;
  --rs-input-focus-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
  --rs-btn-gradient: linear-gradient(90deg, #ef4444, #b91c1c);
  --rs-passkey-gradient: linear-gradient(90deg, #b91c1c, #7f1d1d);
}

/* Basic helpers */
.rs-theme body,
.rs-theme {
  color: var(--rs-text);
  background-color: var(--rs-surface);
}
.rs-card {
  background: var(--rs-surface);
  border: 1px solid var(--rs-border);
  border-radius: 12px;
  padding: 16px;
  /* subtle lift on dark */
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
}
.btn-rs-primary {
  background: var(--rs-btn-gradient);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
}
.btn-rs-accent {
  background: var(--rs-gold);
  color: #111;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: none;
}
.text-rs-red {
  color: var(--rs-red);
}
.rs-focus:focus {
  outline: 3px solid rgba(79, 70, 229, 0.12);
  outline-offset: 2px;
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Responsive container tweaks used by templates */
.rs-container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* Small utilities */
.rs-flex {
  display: flex;
  align-items: center;
}
.rs-space-x-2 > * + * {
  margin-left: 0.5rem;
}

/* Simple theming for links and buttons */
a.rs-link {
  color: var(--rs-indigo);
  text-decoration: none;
}
a.rs-link:hover {
  text-decoration: underline;
}

/* Make tables look a bit nicer */
.rs-table {
  width: 100%;
  border-collapse: collapse;
}
.rs-table th,
.rs-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--rs-border);
}

/* Small alert */
.rs-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: #ffd7d7;
}

/* Utilities used by login template */
.gradient-bg {
  background: var(--rs-gradient-bg);
  color: #ffffff;
}

.glass-effect {
  background: var(--rs-glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rs-glass-border);
  color: var(--rs-text);
}

/* Ensure form elements have proper contrast on dark bg */
.glass-effect input[type="email"],
.glass-effect input[type="password"] {
  background: rgba(255, 255, 255, 0.04);
  color: var(--rs-text);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-effect input[type="email"]:focus,
.glass-effect input[type="password"]:focus {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--rs-input-focus-color);
}
.glass-effect label,
.glass-effect span,
.glass-effect p {
  color: var(--rs-text);
}

.input-focus:focus {
  border-color: var(--rs-input-focus-color);
  box-shadow: var(--rs-input-focus-shadow);
  outline: none;
}

.btn-gradient {
  background: var(--rs-btn-gradient);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.passkey-btn {
  background: var(--rs-passkey-gradient);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

/* Respect existing utilities but ensure template-hidden class is present */
.hidden {
  display: none !important;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rs-stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.rs-stat-number {
  font-size: 32px;
  font-weight: bold;
  color: var(--rs-indigo, #3498db);
}
.rs-dev-section,
.developers-section {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.rs-tab-filter {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}
.rs-tab-filter .tab {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}
.rs-tab-filter .tab.active {
  border-bottom-color: var(--rs-indigo, #3498db);
  color: var(--rs-indigo, #3498db);
  font-weight: bold;
}
.developer-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition: box-shadow 0.3s;
}
.developer-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Auth UI system (light + dark) */
.auth-theme {
  font-family: "Work Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--auth-text);
  background: var(--auth-bg);
}
.auth-theme h1,
.auth-theme h2,
.auth-theme h3,
.auth-theme h4 {
  font-family: "Space Grotesk", "Work Sans", system-ui, sans-serif;
}
.auth-theme[data-theme="dark"] {
  --auth-bg: radial-gradient(circle at top, rgba(239, 68, 68, 0.18), transparent 45%),
    radial-gradient(circle at 10% 20%, rgba(185, 28, 28, 0.25), transparent 40%),
    linear-gradient(180deg, #07090c, #0d1218 55%, #0b1016);
  --auth-surface: rgba(13, 18, 25, 0.82);
  --auth-card-bg: rgba(14, 20, 28, 0.86);
  --auth-card-border: rgba(255, 255, 255, 0.08);
  --auth-text: #f8fafc;
  --auth-muted: rgba(226, 232, 240, 0.7);
  --auth-accent: #ef4444;
  --auth-accent-strong: #b91c1c;
  --auth-shadow: 0 20px 50px rgba(2, 6, 23, 0.6);
  --auth-ring: 0 0 0 3px rgba(239, 68, 68, 0.2);
  --auth-inline: rgba(148, 163, 184, 0.2);
}
.auth-theme[data-theme="light"] {
  --auth-bg: radial-gradient(circle at top, rgba(239, 68, 68, 0.18), transparent 45%),
    radial-gradient(circle at 20% 15%, rgba(248, 113, 113, 0.18), transparent 40%),
    linear-gradient(180deg, #f8fafc, #f3f4f6 55%, #eef2f7);
  --auth-surface: rgba(255, 255, 255, 0.92);
  --auth-card-bg: rgba(255, 255, 255, 0.96);
  --auth-card-border: rgba(15, 23, 42, 0.08);
  --auth-text: #0f172a;
  --auth-muted: rgba(30, 41, 59, 0.65);
  --auth-accent: #dc2626;
  --auth-accent-strong: #991b1b;
  --auth-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  --auth-ring: 0 0 0 3px rgba(220, 38, 38, 0.18);
  --auth-inline: rgba(148, 163, 184, 0.25);
}
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--auth-bg);
}
.auth-shell--dashboard {
  align-items: flex-start;
}
.auth-container {
  width: 100%;
  max-width: 1120px;
}
.auth-panel {
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.auth-card {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(12px);
}
.auth-card--tight {
  padding: 20px;
}
.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-strong));
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.35);
  margin-bottom: 18px;
}
.auth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.auth-subtitle {
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.auth-muted {
  color: var(--auth-muted);
}
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
  text-align: left;
}
.auth-input {
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--auth-surface);
  color: var(--auth-text);
  border: 1px solid var(--auth-card-border);
  font-size: 14px;
}
.auth-input:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: var(--auth-ring);
}
.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-actions--split {
  justify-content: space-between;
  width: 100%;
}
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-btn:hover {
  transform: translateY(-1px);
}
.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.auth-btn--primary {
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-strong));
  color: #fff;
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.3);
}
.auth-btn--ghost {
  background: transparent;
  color: var(--auth-text);
  border-color: var(--auth-card-border);
}
.auth-btn--soft {
  background: rgba(239, 68, 68, 0.12);
  color: var(--auth-accent);
  border-color: rgba(239, 68, 68, 0.2);
}
.auth-btn--block {
  width: 100%;
}
.auth-link {
  color: var(--auth-muted);
  font-size: 13px;
  text-decoration: none;
}
.auth-link:hover {
  color: var(--auth-text);
}
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--auth-text);
  font-size: 13px;
  margin-bottom: 18px;
}
.auth-alert--success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}
.auth-inline-card {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--auth-card-border);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
}
.auth-divider {
  height: 1px;
  background: var(--auth-inline);
  margin: 16px 0;
}
.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  box-shadow: var(--auth-shadow);
  margin-bottom: 24px;
}
.auth-topbar-title {
  font-size: 24px;
  font-weight: 700;
}
.auth-topbar-meta {
  color: var(--auth-muted);
  font-size: 13px;
}
.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.auth-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.auth-pill--good {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
}
.auth-pill--warn {
  background: rgba(239, 68, 68, 0.18);
  color: var(--auth-accent);
}
.auth-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--auth-card-border);
}
.auth-list-title {
  font-weight: 600;
  font-size: 14px;
}
.auth-list-meta {
  color: var(--auth-muted);
  font-size: 12px;
}
.auth-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--auth-card-border);
  color: var(--auth-text);
  background: transparent;
}
.auth-icon-btn--danger {
  color: var(--auth-accent);
}
.auth-footer-note {
  margin-top: 18px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 12px;
}
.auth-text-success {
  color: #10b981;
}
.auth-text-danger {
  color: #ef4444;
}
.developer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}
.developer-name {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}
.developer-email {
  color: #666;
  margin-top: 5px;
}
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}
.status-pending {
  background-color: #fff3cd;
  color: #856404;
}
.status-approved {
  background-color: #d4edda;
  color: #155724;
}
.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}
.developer-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}
.detail-item {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 5px;
}
.detail-label {
  font-weight: bold;
  color: #555;
  font-size: 12px;
  text-transform: uppercase;
}
.detail-value {
  color: #333;
  margin-top: 5px;
}
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}
.btn-success {
  background-color: #27ae60;
  color: white;
}
.btn-success:hover {
  background-color: #229954;
}
.btn-danger {
  background-color: #e74c3c;
  color: white;
}
.btn-danger:hover {
  background-color: #c0392b;
}
.btn-warning {
  background-color: #f39c12;
  color: white;
}
.btn-warning:hover {
  background-color: #e67e22;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}
.form-group textarea {
  height: 80px;
  resize: vertical;
}
.hidden {
  display: none;
}

/* ============================================
   ENHANCED UI COMPONENTS - Modern Animations
   ============================================ */

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Animation Utility Classes */
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fade-in-down { animation: fadeInDown 0.5s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease-out forwards; }
.animate-slide-in-right { animation: slideInRight 0.4s ease-out forwards; }
.animate-slide-in-left { animation: slideInLeft 0.4s ease-out forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }
.animate-shake { animation: shake 0.5s ease-in-out; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Staggered Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Enhanced Auth Panel Animation */
.auth-panel {
  animation: fadeInUp 0.6s ease-out forwards;
}

.auth-card {
  animation: scaleIn 0.4s ease-out forwards;
  animation-delay: 150ms;
  opacity: 0;
}

/* Enhanced Logo Animation */
.auth-logo {
  animation: fadeInDown 0.5s ease-out forwards, float 4s ease-in-out infinite;
  animation-delay: 0s, 0.5s;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-logo:hover {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 16px 40px rgba(185, 28, 28, 0.45);
}

/* Enhanced Button Styles */
.auth-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.auth-btn:hover::before {
  width: 300px;
  height: 300px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-btn--primary:hover {
  box-shadow: 0 14px 30px rgba(185, 28, 28, 0.4);
}

/* Button Loading State */
.auth-btn--loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}

.auth-btn--loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Enhanced Input Styles */
.auth-input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.auth-input:hover {
  border-color: var(--auth-accent);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.auth-input:focus {
  transform: translateY(-1px);
  box-shadow: var(--auth-ring), 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Input Group with Icon */
.auth-input-group {
  position: relative;
}

.auth-input-group .auth-input {
  padding-left: 44px;
}

.auth-input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-muted);
  transition: color 0.3s ease;
  pointer-events: none;
}

.auth-input-group:focus-within .input-icon {
  color: var(--auth-accent);
}

/* Enhanced Alert Styles */
.auth-alert {
  animation: slideInRight 0.4s ease-out forwards;
  transition: all 0.3s ease;
}

.auth-alert:hover {
  transform: translateX(4px);
}

.auth-alert--success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}

.auth-alert--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.auth-alert--info {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 300px;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.4s ease-out forwards;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(12px);
}

.toast--success { border-left: 4px solid #10b981; }
.toast--error { border-left: 4px solid #ef4444; }
.toast--warning { border-left: 4px solid #f59e0b; }
.toast--info { border-left: 4px solid #3b82f6; }

.toast-icon {
  font-size: 18px;
}

.toast--success .toast-icon { color: #10b981; }
.toast--error .toast-icon { color: #ef4444; }
.toast--warning .toast-icon { color: #f59e0b; }
.toast--info .toast-icon { color: #3b82f6; }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--auth-muted);
}

.toast-close {
  background: none;
  border: none;
  color: var(--auth-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: var(--auth-text);
}

.toast.hiding {
  animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--auth-surface) 25%,
    rgba(148, 163, 184, 0.15) 50%,
    var(--auth-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton--text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton--text-sm { height: 12px; }
.skeleton--text-lg { height: 20px; }
.skeleton--circle {
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

.skeleton--button {
  height: 44px;
  border-radius: 12px;
}

/* Enhanced Card Styles */
.auth-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.7);
}

/* Enhanced List Items */
.auth-list-item {
  transition: all 0.3s ease;
}

.auth-list-item:hover {
  background: rgba(148, 163, 184, 0.15);
  transform: translateX(4px);
}

/* Icon Button Enhancements */
.auth-icon-btn {
  transition: all 0.2s ease;
}

.auth-icon-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  transform: scale(1.05);
}

.auth-icon-btn--danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Password Strength Indicator */
.password-strength {
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.2);
  margin-top: 8px;
  overflow: hidden;
}

.password-strength__bar {
  height: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  width: 0%;
}

.password-strength__bar--weak { width: 25%; background: #ef4444; }
.password-strength__bar--fair { width: 50%; background: #f59e0b; }
.password-strength__bar--good { width: 75%; background: #10b981; }
.password-strength__bar--strong { width: 100%; background: #059669; }

/* Enhanced Pills/Badges */
.auth-pill {
  transition: all 0.2s ease;
}

.auth-pill:hover {
  transform: scale(1.05);
}

/* Progress Bar */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--auth-accent), var(--auth-accent-strong));
  transition: width 0.5s ease;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 8px 12px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-card-border);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Enhanced Divider */
.auth-divider {
  position: relative;
  overflow: hidden;
}

.auth-divider::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--auth-inline), transparent);
}

/* Focus Ring Enhancement */
*:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background: rgba(239, 68, 68, 0.3);
  color: var(--auth-text);
}

/* Enhanced Topbar */
.auth-topbar {
  animation: fadeInDown 0.5s ease-out forwards;
}

/* Enhanced Grid Animation */
.auth-grid .auth-card {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.auth-grid .auth-card:nth-child(1) { animation-delay: 100ms; }
.auth-grid .auth-card:nth-child(2) { animation-delay: 200ms; }
.auth-grid .auth-card:nth-child(3) { animation-delay: 300ms; }
.auth-grid .auth-card:nth-child(4) { animation-delay: 400ms; }

/* Form Field Animation */
.auth-label {
  transition: color 0.2s ease;
}

.auth-input:focus + .auth-label,
.auth-input:not(:placeholder-shown) + .auth-label {
  color: var(--auth-accent);
}

/* Floating Label Effect */
.auth-field--floating {
  position: relative;
}

.auth-field--floating .auth-input {
  padding-top: 20px;
  padding-bottom: 8px;
}

.auth-field--floating .auth-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.2s ease;
  pointer-events: none;
  margin-bottom: 0;
}

.auth-field--floating .auth-input:focus + .auth-label,
.auth-field--floating .auth-input:not(:placeholder-shown) + .auth-label {
  top: 12px;
  font-size: 11px;
  transform: translateY(0);
}

/* Link Hover Effect */
.auth-link {
  position: relative;
  transition: color 0.2s ease;
}

.auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--auth-accent);
  transition: width 0.3s ease;
}

.auth-link:hover::after {
  width: 100%;
}

/* Modal Enhancement */
.modal {
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  animation: scaleIn 0.3s ease-out forwards;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

/* Responsive Enhancements */
@media (max-width: 640px) {
  .auth-panel {
    max-width: 100%;
  }
  
  .auth-card {
    border-radius: 18px;
    padding: 20px;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .toast-container {
    left: 10px;
    right: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* Dark Mode Scrollbar */
.auth-theme[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.auth-theme[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 4px;
}

.auth-theme[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

.auth-theme[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* developer_register.html */
/* Simple centered developer registration style (migrated) */
body .dev-register,
.dev-register body,
.dev-register .container {
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #f5f5f5;
}
.dev-register .container {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.dev-register h1 {
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}
.dev-register .form-group {
  margin-bottom: 20px;
}
.dev-register label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}
.dev-register input,
.dev-register textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
}
.dev-register textarea {
  height: 100px;
  resize: vertical;
}
.dev-register .required {
  color: #e74c3c;
}
.dev-register button {
  width: 100%;
  padding: 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.dev-register button:hover {
  background-color: #2980b9;
}
.dev-register .login-link {
  text-align: center;
  margin-top: 20px;
}
.dev-register .login-link a {
  color: #3498db;
  text-decoration: none;
}
.dev-register .login-link a:hover {
  text-decoration: underline;
}

/* developer_docs & developer_docs_json (documentation pages) */
.rs-docs * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.rs-docs body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}
.rs-docs .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}
.rs-docs .header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}
.rs-docs .header h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.rs-docs .header p {
  font-size: 1.2rem;
  opacity: 0.9;
}
.rs-docs .content {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.rs-docs .endpoints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.rs-docs .endpoint-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  border-left: 4px solid #667eea;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rs-docs .endpoint-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.rs-docs .endpoint-card h3 {
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.rs-docs .endpoint-card a {
  color: #2a5298;
  text-decoration: none;
}

/* developer_login, pending, rejected (developer portal pages) */
.dev-portal body,
.dev-portal .container {
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: 80px auto;
  padding: 20px;
  background-color: #f5f5f5;
}
.dev-portal .container {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.dev-portal h1 {
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}
.dev-portal .form-group {
  margin-bottom: 20px;
}
.dev-portal label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}
.dev-portal input,
.dev-portal textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
}
.dev-portal button {
  width: 100%;
  padding: 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.dev-portal button:hover {
  background-color: #2980b9;
}
.dev-portal .info-box {
  background-color: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
  color: #0c5460;
}
.dev-portal .pending-icon,
.dev-portal .rejected-icon {
  font-size: 60px;
  margin-bottom: 20px;
}
.dev-portal .pending-icon {
  color: #f39c12;
}
.dev-portal .rejected-icon {
  color: #e74c3c;
}
.dev-portal .status-message {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 5px;
  padding: 20px;
  margin: 20px 0;
  color: #856404;
}
.dev-portal .status-message.rejected {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}
.dev-portal .developer-info {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 20px;
  margin: 20px 0;
  text-align: left;
}
.dev-portal .contact-info {
  margin-top: 30px;
  padding: 20px;
  background-color: #e8f4fd;
  border-radius: 5px;
  color: #0c5460;
}

/* developer_docs_json specific additions */
.rs-docs-json body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  min-height: 100vh;
}
.rs-docs-json .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}
.rs-docs-json .header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}
.rs-docs-json .header h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.rs-docs-json .nav-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 2rem;
  overflow-x: auto;
}
.json-container {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1rem 0;
  overflow-x: auto;
  position: relative;
}
.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.3s ease;
}
.copy-button:hover {
  background: #45a049;
}
.copy-button.copied {
  background: #2196f3;
}

/* new_client/simple pages already use include — ensure minimum helpers */
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--rs-indigo);
  text-decoration: none;
}
.back-link:hover {
  text-decoration: underline;
}
.info-box {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

/* keep file-specific hidden class available */
.hidden {
  display: none !important;
}

/* Add small template utilities used by verify_email.html, relying on theme variables */
.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 18px;
  background: var(--rs-btn-gradient);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.code-input {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 22px;
  text-align: center;
  letter-spacing: 8px;
  font-family: "Courier New", monospace;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--rs-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.code-input:focus {
  border-color: var(--rs-input-focus-color);
  box-shadow: var(--rs-input-focus-shadow);
  outline: none;
}

.email-display {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  color: var(--rs-text);
  font-weight: 600;
  word-break: break-all;
}

.subtitle {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 16px;
  line-height: 1.4;
}

.timer {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
  font-size: 14px;
}

/* map message classes to theme-friendly styles */
.msg-success,
.success {
  padding: 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.12);
  color: #10b981;
  margin-bottom: 12px;
}
.msg-error,
.error {
  padding: 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: #ef4444;
  margin-bottom: 12px;
}

/* Ensure primary and accent button classes exist (used by templates) */
.btn-rs-primary {
  background: var(--rs-btn-gradient);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn-rs-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.btn-rs-accent {
  background: transparent;
  color: var(--rs-text);
  border: 2px solid rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
}
