@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #0f172a;
  --secondary-color: #334155;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --glass: rgba(255, 255, 255, 0.8);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Navbar */
.navbar {
  background-color: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(8px);
  height: 70px;
  /* Fixed height for navbar */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 90px;
  width: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  transition: transform 0.2s ease;
}

.navbar-logo:hover {
  transform: translateY(-50%) scale(1.05);
}

.navbar-brand {
  position: relative;
  height: 70px;
  width: 180px;
  /* Give space for the absolute logo */
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: #fff !important;
}

.navbar .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem !important;
}

.navbar .nav-link:hover {
  color: #fff !important;
}

.navbar-toggler {
  border: none;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #0f172a;
    margin-top: 0;
    padding: 1rem;
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
  }
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-lg {
  padding: 0.875rem 2rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgb(0 0 0 / 0.15);
}

.transition-hover {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.transition-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Avatars */
.avatar-sm {
  width: 32px;
  height: 32px;
  line-height: 32px;
  font-size: 0.75rem;
}

.avatar-md {
  width: 48px;
  height: 48px;
  line-height: 48px;
  font-size: 1rem;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  line-height: 64px;
  font-size: 1.5rem;
}

.avatar-sm,
.avatar-md,
.avatar-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem;
}

/* Forms */
.form-control,
.form-select {
  border-radius: 8px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  background-color: #fdfdfd;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.validation-summary-valid {
  display: none !important;
}

.validation-summary-errors ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.field-validation-error {
  font-size: 0.825rem;
  font-weight: 500;
  margin-top: 0.25rem;
  display: block;
}

/* Hero Section */
.header-gradient {
  background: radial-gradient(circle at top right, #1e293b, #0f172a);
  color: white;
  padding: 6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: #f8fafc;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-top: none;
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
}

/* Badges */
.badge {
  padding: 0.5em 0.75em;
  font-weight: 600;
  border-radius: 6px;
}

/* Utils */
.text-muted {
  color: var(--text-muted) !important;
}

/* Footer */
footer {
  background-color: #fff;
  border-top: 1px solid var(--border-color);
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--primary-color);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link {
    padding: 0.75rem 0 !important;
  }

  .header-gradient {
    padding: 4rem 0;
  }
}

/* Identity Management Pages Styling */
#main-content h1,
#main-content h2,
#main-content h4,
#main-content .alert,
#main-content hr {
  max-width: 1140px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px;
  padding-right: 15px;
  display: block;
}

#main-content h2 {
  display: none !important;
}

#main-content h4 {
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 3rem;
  /* Added margin since h2 is hidden */
}

#main-content hr {
  margin: 2rem auto !important;
}

#main-content .row {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure Identity forms look premium */
#main-content .form-floating .form-control {
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#main-content .btn-primary {
  padding: 0.8rem 2rem;
  font-weight: 600;
}

/* Personal Data Buttons Gap & Equal Width */
#main-content form .btn,
#main-content form button,
#main-content .btn-danger {
  margin-right: 15px !important;
  margin-bottom: 10px;
  min-width: 150px;
  /* Forces equal width for Download/Delete */
}

.nav-pills .nav-link {
  color: var(--text-main);
  border-radius: 8px;
  margin-bottom: 5px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
  background-color: var(--accent-color);
  color: white !important;
}

.nav-pills .nav-link:hover:not(.active) {
  background-color: #f1f5f9;
  color: var(--accent-color);
}

/* Auth Navigation Buttons */
.btn-nav-auth {
  position: relative;
  padding: 8px 20px;
  border-radius: 7px;
  border: 1px solid rgb(61, 106, 255);
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1.5px;
  background: transparent;
  color: #fff !important;
  overflow: hidden;
  box-shadow: 0 0 0 0 transparent;
  transition: all 0.2s ease-in;
  text-decoration: none;
  display: inline-block;
}

.btn-nav-auth:hover {
  background: rgb(61, 106, 255);
  box-shadow: 0 0 30px 5px rgba(0, 142, 236, 0.5);
  transition: all 0.2s ease-out;
  color: #fff !important;
}

.btn-nav-auth:hover::before {
  animation: sh02 0.5s 0s linear;
}

.btn-nav-auth::before {
  content: '';
  display: block;
  width: 0px;
  height: 86%;
  position: absolute;
  top: 7%;
  left: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 50px 30px #fff;
  transform: skewX(-20deg);
}

@keyframes sh02 {
  from {
    opacity: 0;
    left: 0%;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
    left: 100%;
  }
}

.btn-nav-auth:active {
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.2s ease-in;
  transform: scale(0.95);
}

/* Status Badges - Smooth Styles */
.status-invited {
  background-color: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #10b98120 !important;
  font-weight: 600;
}

.status-payment-pending {
  background-color: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #f59e0b20 !important;
  font-weight: 600;
}

.badge {
  border-radius: 8px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Generate Invite Button */
.btn-generate-invite {
  font-family: inherit;
  font-size: 18px;
  background: linear-gradient(to bottom, #4dc7d9 0%, #66a6ff 100%);
  color: white;
  padding: 0.8em 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 25px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
  width: 100%;
}

.btn-generate-invite:hover {
  transform: translateY(-3px);
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
  color: white;
}

.btn-generate-invite:active {
  transform: scale(0.95);
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-generate-invite span {
  display: block;
  margin-left: 0.4em;
  transition: all 0.3s;
}

.btn-generate-invite svg {
  width: 18px;
  height: 18px;
  fill: white;
  transition: all 0.3s;
}

.btn-generate-invite .svg-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  margin-right: 0.5em;
  transition: all 0.3s;
}

.btn-generate-invite:hover .svg-wrapper {
  background-color: rgba(255, 255, 255, 0.5);
}

.btn-generate-invite:hover svg {
  transform: rotate(45deg);
}

.btn-generate-invite:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Logout Modal */
.logout-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.logout-modal-overlay.active {
  display: flex;
}

.logout-card {
  width: 320px;
  height: fit-content;
  background: white;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px;
  position: relative;
  box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.068);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.logout-card-content {
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.logout-card-heading {
  font-size: 20px;
  font-weight: 700;
  color: rgb(27, 27, 27);
}

.logout-card-description {
  font-weight: 400;
  color: rgb(102, 102, 102);
  font-size: 14px;
}

.logout-card-button-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logout-card-button {
  width: 50%;
  height: 40px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.logout-card-button.primary {
  background-color: rgb(255, 114, 109);
  color: white;
}

.logout-card-button.primary:hover {
  background-color: rgb(255, 73, 66);
}

.logout-card-button.secondary {
  background-color: #f1f5f9;
  color: #475569;
}

.logout-card-button.secondary:hover {
  background-color: #e2e8f0;
}

.logout-exit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  padding: 5px;
}

.logout-exit-button:hover svg {
  fill: black;
}

.logout-exit-button svg {
  fill: rgb(175, 175, 175);
  transition: fill 0.2s;
}

/* Modal Customizations */
.modal-backdrop.show {
  backdrop-filter: blur(8px);
  background-color: rgba(15, 23, 42, 0.4);
}

.modal.fade .modal-dialog {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content {
  border-radius: 1.25rem;
  overflow: hidden;
}

.terms-content section {
  border-left: 2px solid #e2e8f0;
  padding-left: 1.5rem;
  position: relative;
  transition: border-color 0.3s ease;
}

.terms-content section:hover {
  border-left-color: var(--accent-color);
}

.terms-content h6 {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.terms-content p {
  margin-bottom: 0.5rem;
}

.modal-header .btn-close {
  background-color: #fff;
  padding: 0.5rem;
  border-radius: 50%;
  opacity: 0.8;
  transition: all 0.2s;
}

.modal-header .btn-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* Landing Page Elite Styles */
.section-padding {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* Hero Enhancements */
.hero-authority {
  padding: 140px 0 100px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 50px;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Feature Cards Grid */
.feature-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  height: 100%;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

/* Timeline Blocks */
.timeline-item {
  position: relative;
  padding-left: 50px;
  margin-bottom: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  width: 2px;
  height: 100%;
  background: #e2e8f0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 1;
}

/* Comparison Table */
.comparison-container {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.comp-header {
  background: #f8fafc;
  padding: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.comp-list {
  list-style: none;
  padding: 2rem;
  margin: 0;
}

.comp-list li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 500;
}

.comp-list li i {
  margin-right: 1.25rem;
  font-size: 1.25rem;
}

/* Tech Stack Scroll */
.tech-item {
  background: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--secondary-color);
  white-space: nowrap;
}

/* FAQ Accordion */
.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 16px !important;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-button {
  padding: 1.5rem !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  box-shadow: none !important;
}

.faq-button:not(.collapsed) {
  background: #f1f5f9 !important;
  color: var(--accent-color) !important;
}

.faq-body {
  padding: 1.5rem !important;
  color: var(--text-muted);
}

/* Final CTA */
.final-cta {
  background: var(--primary-color);
  color: white;
  border-radius: 30px;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Scroll Reveal Animations */
[class*="reveal-"] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-fade-up {
  transform: translateY(40px);
}

.reveal-fade-left {
  transform: translateX(-40px);
}

.reveal-fade-right {
  transform: translateX(40px);
}

.reveal-scale {
  transform: scale(0.95);
}

.reveal-visible {
  opacity: 1 !important;
  transform: translate(0) scale(1) !important;
}

/* Staggered Delay Helpers */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

.delay-500 {
  transition-delay: 500ms;
}

/* Pulse Animation for Logo/Highlights */
@keyframes softPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.02);
    opacity: 0.95;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse-soft {
  animation: softPulse 3s infinite ease-in-out;
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.float-anim {
  animation: float 5s infinite ease-in-out;
}

/* 🧬 UNIQUE: High-Tech Background & Interaction 🧬 */

/* Moving Circuit/Neural Grid Background for Hero */
.hero-authority {
  position: relative;
  overflow: hidden;
}

.hero-authority::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.05) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.5;
  animation: gridMove 60s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(-40px, -40px);
  }
}

/* Interactive Magnetic Cards */
.feature-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Spotlight Glow Effect on Hover */
.feature-card::after {
  content: "";
  position: absolute;
  top: var(--y, 0);
  left: var(--x, 0);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle closest-side, rgba(59, 130, 246, 0.12), transparent);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.feature-card:hover::after {
  opacity: 1;
}

/* Glass Highlight for Headers */
.section-title {
  background: linear-gradient(120deg, var(--primary-color) 0%, #3b82f6 50%, var(--primary-color) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 8s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Floating Particle in Final CTA */
.final-cta::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  animation: slowScroll 100s linear infinite;
  top: 0;
  left: 0;
}

@keyframes slowScroll {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 1000px 1000px;
  }
}