.allauth-root { --aa-accent: #4ea8ff; --aa-shadow: 0 10px 30px rgba(8,26,40,0.12); }

/* labels and help text */
.allauth-root label { display:block; margin-bottom:6px; font-weight:700; color: var(--text-secondary) !important; }
.allauth-root .helptext { color:#56797f; font-size:0.95rem; margin-bottom:8px; }

/* inputs / selects / textareas */
.allauth-root input[type="text"],
.allauth-root input[type="email"],
.allauth-root input[type="password"],
.allauth-root input[type="tel"],
.allauth-root input[type="url"],
.allauth-root textarea,
.allauth-root select {
  display:block;
  width:100%;
  padding:10px 12px;
  margin: 0 0 12px 0;
  border:1px solid var(--border-color) !important;
  border-radius:6px;
  background: var(--bg-app) !important;
  color:var(--text-main) !important;
  box-sizing:border-box;
  font: inherit;
}

/* override utility classes from other bundles by specificity */
.allauth-root input,
.allauth-root select,
.allauth-root textarea {
  background-clip: padding-box !important;
}

/* error / non-field errors */
.allauth-root .errorlist,
.allauth-root .form-errors,
.allauth-root .w3-panel.w3-pale-red {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #9b2c2c;
  padding: 10px;
  border-radius: 6px;
  margin-bottom:12px;
}

/* submit button */
.allauth-root button[type="submit"],
.allauth-root .w3-button {
  display:inline-block;
  padding:10px 16px;
  margin-top: 8px;
  background: var(--primary-gradient);
  color: #000;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-weight:700;
}

.allauth-root .text-error{
  color: #9b2c2c !important;
}

/* small responsive tweak */
@media (max-width:600px) {
  .allauth-root form,
  .allauth-root .allauth-form { padding:18px; margin: 0 12px; }
}


/* Landing Page Styles */ 

:root {
  /* Default Dark Theme Variables */
  --bg-app: #050505;
  --surface: #0f0f12;
  --surface-highlight: #1a1a1f;
  --card-bg: #16161c;
  
  --text-main: #ffffff;
  --text-secondary: #9ca3af;
  --error-color: #f87171;
  --accent: #4a8fb6;

  
  --border-color: rgba(255,255,255,0.1);
  --glass-bg: rgba(20, 20, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  --primary-gradient: linear-gradient(135deg, #4193db 0%, #6dbfd6 100%);
  --text-gradient: linear-gradient(90deg, #ffffff 0%, #a5b4fc 100%);
  --nav-height: 64px;
  --sidebar-width: 300px;
}

/* Light Theme Overrides - "Scientific Journal" Aesthetic */
body.light-theme {
  --bg-app: #ffffff;
  --surface: #f8fafc;
  --surface-highlight: #f1f5f9;
  --card-bg: #ffffff;
  
  --text-main: #0f172a;
  --text-secondary: #64748b;
  --error-color: #f87171;
  --accent: #4a8fb6;

  --border-color: rgba(148, 163, 184, 0.25);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(148, 163, 184, 0.2);
  
  /* Deeper, more authoritative gradient for contrast against white */
  --text-gradient: linear-gradient(135deg, #0369a1 0%, #4338ca 100%);
  --nav-height: 64px;
  --sidebar-width: 300px;
}

body,h1,h2,h3,h4,h5,h6 {
  font-family: "Outfit", sans-serif;
}

body, html {
  height: 100%;
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--bg-app);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Utilities using Variables */
.text-gradient {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-highlight {
  color: var(--accent);
}
body.light-theme .text-highlight {
  color: #0284c7;
}

/* Glassmorphism */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-nav {
  background: var(--surface) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  opacity: 0.95;
}

/* Keep navbar height consistent whether glass-nav is present or not */
#mainNavBar {
  min-height: var(--nav-height);
  box-sizing: border-box;
  background-color: var(--bg-app) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure the inner flex container fills the bar and vertically centers items */
#mainNavBar > .w3-content {
  height: 100%;
  display: flex;
  align-items: center;
}

/* Prevent child buttons from increasing the container height unexpectedly */
#mainNavBar .w3-button {
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1;
  box-sizing: border-box;
}

/* When glass-nav is applied, use glass effect instead */
#mainNavBar.glass-nav {
  background-color: var(--surface) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

/* Ensure w3-transparent doesn't override during initial state */
#mainNavBar.w3-transparent {
  background-color: var(--bg-app) !important;
}

/* Sidebar — theme-aware */
#mySidebar {
  background: var(--surface);
  color: var(--text-main);       
  position: fixed;
  left: 0;
  top: var(--nav-height);
  width: var(--sidebar-width);
  height: calc(100vh - var(--nav-height));
  overflow: auto;
  box-sizing: border-box;
  z-index: 1000; 
}

.content-main {
  margin-left: var(--sidebar-width);
  margin-top: var(--nav-height);
  transition: margin 0.2s ease;
  box-sizing: border-box;
  padding: 16px;
}

/* Avatar badge (placeholder) */
.avatar-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-weight:700;
  background: var(--primary-gradient);
  color: var(--bg-app);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* Link text colors */
#mySidebar .w3-bar-item {
  color: var(--text-secondary);
}

/* Hover & focus */
#mySidebar .w3-bar-item:hover,
#mySidebar .w3-bar-item:focus {
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02));
}

/* Active link — theme-aware highlight */
.sidebar-active {
  background: linear-gradient(90deg, rgba(56,189,248,0.12), rgba(56,189,248,0.04));
  color: var(--text-main) !important;
  border-left: 4px solid rgba(56,189,248,0.75);
  padding-left: 12px; /* compensate for left border */
}

/* Close button visible on mobile, theme-aware */
.sidebar-close {
  display: none;
  background: transparent;
  color: var(--text-main);
  border: none;
  padding: 6px;
  cursor: pointer;
  box-sizing: border-box;
}

.ds-sample thead{
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main) !important;
}

/* Keep the theme toggle box consistent */
#themeToggle {
  width: 40px;
  height: 40px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Modern Cards */
.feature-card {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  color: var(--text-main);
}

.feature-card:hover {
  transform: translateY(-5px);
  background-color: var(--surface-highlight);
  border-color: var(--accent);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
}

/* Use Case Hover Effects */
.use-case-card {
  overflow: hidden;
}
.use-case-bg {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.use-case-card:hover .use-case-bg {
  transform: scale(1.1);
}
.use-case-card:hover .use-case-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, rgba(56, 189, 248, 0.1) 100%) !important;
}

/* Hero Background */
.bg-hero {
  background-position: center;
  background-size: cover;
  position: relative;
  min-height: 90vh;
}
/* Dark mode hero overlay */
.bg-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(5,5,5,0.6), rgba(5,5,5,0.85)), url("https://images.unsplash.com/photo-1639322537228-f710d846310a?q=80&w=2600&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
/* Light mode specific hero adjustment - Matches new white background */
body.light-theme .bg-hero::after {
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.75)), url("https://images.unsplash.com/photo-1639322537228-f710d846310a?q=80&w=2600&auto=format&fit=crop");
    background-size: cover;
    filter: invert(0); 
}

/* Buttons */
.btn-primary {
  background: var(--primary-gradient);
  color: #000;
  font-weight: 700;
  border: none;
}
body.light-theme .btn-primary {
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--text-secondary);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--text-main);
  color: var(--bg-app) !important;
}

.w3-bar .w3-button {
  padding: 12px 24px;
}

/* Helper for text colors in components */
.text-main { color: var(--text-main) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* Animations */
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-float-in {
  animation: floatIn 0.6s ease-out forwards;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}
.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse-ring 2s infinite;
}

/* Grid and Glow Effects */
.bg-grid {
  background-image: linear-gradient(rgba(100, 100, 100, 0.05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(100, 100, 100, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* Mobile: make sidebar an overlay (full width), content does NOT shift */
@media (max-width: 992px) {
  :root { --nav-height: 56px; } /* optional tweak for mobile */
  #mySidebar {
    top: var(--nav-height) !important;
    width: 100% !important;
    height: 100vh !important;
    transform: translateX(-100%); /* off-canvas by default */
    transition: transform 0.28s ease;
  }
  #mySidebar.w3-show {
  transform: translateX(0) !important;
  }
  .content-main {
    margin-left: 0 !important;
    margin-top: var(--nav-height);
    padding: 16px; /* give mobile content some breathing room */
  }
  /* make the collapse/close link visible on mobile if needed */
  .sidebar-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    position: absolute !important;
    right: 12px !important;
    top: 12px !important;
    z-index: 1100 !important;
  }
  /* ensure overlay sits above page */
  #myOverlay {
    z-index: 1500 !important;
    top: var(--nav-height);
    left: 0;
  }

  #mySidebar {
    z-index: 2000 !important;
    position: fixed; /* keep fixed so z-index applies consistently */
    top: var(--nav-height) !important;
  }

  #mySidebar.w3-show {
    z-index: 2000 !important;
    transform: translateX(0) !important;
  }

  #mySidebar .w3-bar-item.sidebar-close-full { display: none !important; }
  /* when overlay is active the JS sets display:block — keep behavior */
}

/* Keep desktop accessible: if sidebar is hidden/collapsed, content returns to full-width */
@media (min-width: 993px) {
  #mySidebar { transform: none; }
}


/* workflow styles */


.tablink {
    color: var(--text-secondary);
    background-color: transparent;
    transition: all 0.3s ease;
}

.tablink:hover {
    background-color: var(--surface);
    color: var(--text-main);
}

.tablink.active {
    color: rgb(56, 189, 248);
    border-bottom: 3px solid rgb(56, 189, 248) !important;
    background-color: transparent;
}

.tab-content {
    animation: fadeIn 0.5s;
}

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