html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 0;
  font-family: var(--form-font, 'Segoe UI', Arial, sans-serif);
}

/* Button and focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Gradient button */
.btn-gradient {
  background: linear-gradient(90deg, #0057b8 0%, #ffb400 100%);
  color: #fff !important;
  border: none;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-weight: 600;
  border-radius: 0.5rem;
}
.btn-gradient:hover, .btn-gradient:focus {
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  transform: translateY(-2px) scale(1.03);
  color: #fff !important;
}

/* Animations */
.animate-fadein {
  opacity: 0;
  animation: fadeInUp 0.7s forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}

/* Hero sections */
.whyus-hero,
.index-hero {
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
}

/* Backend Layout */
.backend-bg {
  background: #f6f8fa;
}
.backend-sidebar {
  min-height: 100vh;
  background: #232946;
  color: #fff;
  padding-top: 2rem;
  box-shadow: 2px 0 8px rgba(44,62,80,0.04);
  border-right: 1px solid #e5e7eb;
}
.backend-sidebar .sidebar-header {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  color: #fff;
}
.backend-nav-link {
  color: #cbd5e1;
  font-weight: 500;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.15s, color 0.15s;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}
.backend-nav-link.active,
.backend-nav-link:focus,
.backend-nav-link:hover {
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}
.backend-nav-link i {
  margin-right: 0.7em;
  font-size: 1.2em;
}
.backend-main-content {
  padding: 0 2rem 2rem 2rem;
  padding-bottom: 0 !important;
}

/* Responsive backend sidebar */
@media (max-width: 991px) {
  html, body {
    height: 100%;
    margin: 0;
    padding: 0;
  }
  .backend-sidebar {
    display: block !important; /* Show sidebar in mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: #232946;
    color: #fff;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(44,62,80,0.12);
    padding-top: 1rem;
  }
  .backend-sidebar .sidebar-header {
    color: #fff;
  }
  .backend-nav-link {
    color: #fff;
    background: none;
  }
  .offcanvas {
    width: 80vw;
    max-width: 320px;
  }
  .backend-main-content {
    padding: 0 0.5rem 1.2rem 0.5rem;
  }
  .footer {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body, html {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* Sidebar width for desktop */
@media (min-width: 992px) {
  .backend-sidebar {
    border-right: none !important;
    box-shadow: none !important;
    margin-right: 0 !important;
  }
  .backend-main-content {
    padding-left: 0 !important;
    padding-right: 2rem;
    padding-top: 0;
    padding-bottom: 2rem;
  }
  .row.gx-0 {
    --bs-gutter-x: 0;
  }
  .backend-sidebar {
    width: 240px;
    min-width: 200px;
    max-width: 280px;
    position: relative;
    min-height: 100vh;
  }
  .backend-sidebar,
  .backend-main-content {
    margin: 0 !important;
  }
}

/* Hide sidebar on mobile (offcanvas will be used) */
@media (max-width: 991px) {
  .backend-sidebar {
    display: none !important;
  }
}

/* Dashboard Styles */
.dashboard-hero {
  background: linear-gradient(90deg, #4776e6 0%, #56c6f7 100%);
  color: #fff;
  margin-top: 0 !important;
  border-radius: 0;
  min-height: 160px;
  display: flex;
  align-items: center;
  width: 100%;
  box-shadow: 0 2px 16px rgba(71, 118, 230, 0.08);
}
.dashboard-card {
  transition: transform 0.15s, box-shadow 0.15s;
}
.dashboard-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(56,189,248,0.10);
}

/* Sidebar section header */
.sidebar-section-header {
  font-size: 1.05rem;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.5rem 0;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.sidebar-section-header i {
  font-size: 1.1em;
  margin-right: 0.5em;
  color: #a5b4fc;
}

/* Footer */
.footer {
  background: #232946 !important;
  color: #fff !important;
  border-top: none;
  position: static;
  font-size: 1rem;
  text-align: center;
  padding: 1.2rem 0 0.7rem 0;
  margin-top: auto;
}
.footer-dot {
  font-size: 1.2em;
  color: #38bdf8;
  margin: 0 0.5em;
}
@media (max-width: 991px) {
  .footer {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/* Navbar */
.main-navbar {
  background: #fff;
  border-bottom: 1.5px solid #e5e7eb;
  min-height: 64px;
  font-size: 1.08rem;
  z-index: 100;
}
.main-navbar .navbar-brand {
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}
.text-gradient {
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.main-navbar .nav-link {
  color: #232946;
  font-weight: 500;
  margin-right: 0.5rem;
  transition: color 0.15s, background 0.15s, border-radius 0.15s;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}
.main-navbar .nav-link.active,
.main-navbar .nav-link:focus,
.main-navbar .nav-link:hover {
  background: #f1f5fd;
  color: #2563eb;
  text-decoration: none;
}

/* Sidebar and Accordion Customization */
.sidebar-header {
    color: #fff;
}
.sidebar-nav-link {
    color: #e0e6ed !important;
    font-weight: 500;
}
.sidebar-nav-link.active, .sidebar-nav-link:hover, .sidebar-nav-link:focus {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}
.accordion-button {
    color: #e0e6ed;
    background: none;
}
.accordion-button:not(.collapsed) {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.accordion-item {
    background: none;
    border: none;
}

/* Shepherd.js Custom Tour Styles */
.shepherd-theme-arrows {
  border-radius: 1rem !important;
  box-shadow: 0 6px 32px rgba(37,99,235,0.10), 0 1.5px 6px rgba(0,0,0,0.04);
  border: none;
  background: #fff;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}
.shepherd-title {
  color: #2563eb;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.shepherd-text {
  color: #232946;
  font-size: 1.05rem;
  line-height: 1.6;
}
.shepherd-button {
  border-radius: 0.5rem !important;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(56,189,248,0.08);
  transition: background 0.15s;
}
.shepherd-button:not(:last-child) {
  background: #e5e7eb;
  color: #232946 !important;
}
.shepherd-cancel-icon {
  color: #2563eb !important;
  opacity: 0.7;
}
.shepherd-arrow {
  color: #2563eb !important;
}

/* Form field focus/transition */
.form-control, .form-select {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--form-accent, #ffb400);
  box-shadow: 0 0 0 0.2rem rgba(255, 180, 0, 0.15);
  outline: none;
  transform: scale(1.02);
}
.form-floating > label {
  transition: color 0.2s;
}
.form-control:focus ~ label,
.form-select:focus ~ label {
  color: var(--form-accent, #ffb400);
}

/* Card and form transitions */
.card, .form-floating, .btn-gradient {
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}

/* Utility: form images */
.form-images img {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Feature Card Hover */
.feature-card {
  transition: transform 0.18s, box-shadow 0.18s, border 0.18s;
}
.feature-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 32px rgba(56,189,248,0.18);
  border: 1.5px solid #38bdf8;
}

/* Timeline Styles */
.timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.timeline-step {
  flex: 1 1 180px;
  min-width: 180px;
  max-width: 220px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(56,189,248,0.07);
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
}
.timeline-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 8px rgba(56,189,248,0.10);
}
.timeline-content h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
@media (max-width: 991px) {
  .timeline {
    flex-direction: column;
    align-items: center;
  }
  .timeline-step {
    max-width: 100%;
    width: 100%;
  }
}

/* Card and form spacing for mobile */
@media (max-width: 767px) {
  .card-body {
    padding: 1rem;
  }
  .form-floating {
    margin-bottom: 1rem;
  }
}

/* Make the offcanvas sidebar match the dark sidebar style */
.offcanvas#backendSidebarOffcanvas {
  background: #232946 !important;
  color: #fff !important;
}
.offcanvas#backendSidebarOffcanvas .offcanvas-title,
.offcanvas#backendSidebarOffcanvas .backend-nav-link,
.offcanvas#backendSidebarOffcanvas .sidebar-header {
  color: #fff !important;
}

.offcanvas#backendSidebarOffcanvas .backend-nav-link i {
  color: #fff !important;
}