html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Enhance the logo appearance */
.logo-box {
  padding: 10px 0;
}

.logo-text h3 {
  color: #ffffff;
  font-size: 20px;
  margin-top: 10px;
  letter-spacing: 0.5px;
}

.logo-text small {
  display: block;
  color: #8095a8;
  font-size: 12px;
  margin-top: -5px;
}

/* Hide the "R" logo element by default */
.logo-element {
  display: none;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  padding: 18px 0;
}

.logo-element span {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  background-color: #1ab394;
  color: white;
}

/* Show "R" logo and hide full text when in mini-navbar mode */
body.mini-navbar .logo-box {
  display: none;
}

body.mini-navbar .logo-element {
  display: block;
}

/* Optional: Add hover effect for the logo */
.nav-header:hover .logo-text h3 {
  color: #1ab394;
  transition: color 0.3s ease;
}

/* Custom balance classes */
.balance-positive {
  color: #28a745;
  font-weight: 500;
}

.balance-negative {
  color: #dc3545;
  font-weight: 500;
}

/* INSPINIA Original Mobile Implementation */
/* On small screens, force sidebar to behave differently */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }
  
  /* Hide sidebar by default on mobile */
  .navbar-default, nav.navbar-default {
    margin-left: -220px !important;
    transition: margin-left 0.3s ease !important;
  }
  
  /* Show sidebar when menu is open */
  body.mobile-menu-open .navbar-default,
  body.mobile-menu-open nav.navbar-default {
    margin-left: 0 !important;
  }
  
  /* Full width page wrapper on mobile */
  #page-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* Mobile overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }
  
  body.mobile-menu-open .mobile-menu-overlay {
    display: block;
  }
  
  /* Ensure sidebar is above overlay */
  .navbar-default {
    z-index: 1050 !important;
    position: fixed !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  /* Mobile toggle button styling */
  .navbar-toggler {
    background-color: #1ab394 !important;
    border: none !important;
    color: white !important;
    padding: 10px 15px !important;
    margin: 8px !important;
    border-radius: 4px !important;
    font-size: 18px !important;
  }
  
  .navbar-toggler:hover {
    background-color: #17a085 !important;
  }
  
  .navbar-toggler:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.3) !important;
  }
  
  /* Force proper sidebar background on mobile */
  .navbar-default {
    background-color: #2f4050 !important;
  }
  
  .navbar-default .nav > li > a {
    color: #a7b1c2 !important;
  }
  
  .navbar-default .nav > li > a:hover,
  .navbar-default .nav > li > a:focus {
    background-color: #293846 !important;
    color: #ffffff !important;
  }
  
  .navbar-default .nav > li.active > a {
    background-color: #1ab394 !important;
    color: #ffffff !important;
  }
  
  /* Search box responsive */
  .search-container {
    margin: 0 10px !important;
  }
  
  .search-container .form-control {
    font-size: 14px !important;
    padding: 8px 12px !important;
  }
}

/* Medium screens - tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar-default {
    width: 200px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 1000 !important;
    background-color: #2f4050 !important;
  }
  
  #page-wrapper {
    margin-left: 200px !important;
    width: calc(100% - 200px) !important;
    min-height: 100vh !important;
  }
  
  body.mini-navbar .navbar-default {
    width: 70px !important;
  }
  
  body.mini-navbar #page-wrapper {
    margin-left: 70px !important;
    width: calc(100% - 70px) !important;
  }
  
  /* Hide mobile toggle on tablet too */
  .navbar-toggler {
    display: none !important;
  }
}

/* Large screens - desktop */
@media (min-width: 992px) {
  .navbar-default {
    width: 220px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 1000 !important;
    background-color: #2f4050 !important;
  }
  
  #page-wrapper {
    margin-left: 220px !important;
    width: calc(100% - 220px) !important;
    min-height: 100vh !important;
  }
  
  body.mini-navbar .navbar-default {
    width: 70px !important;
  }
  
  body.mini-navbar #page-wrapper {
    margin-left: 70px !important;
    width: calc(100% - 70px) !important;
  }
  
  /* Hide mobile toggle on desktop */
  .navbar-toggler {
    display: none !important;
  }
}

/* INSPINIA Body Small class for responsive behavior */
@media (max-width: 768px) {
  body {
    /* This is the original INSPINIA body-small behavior */
    overflow-x: hidden;
  }
  
  body:not(.mobile-menu-open) .navbar-default {
    margin-left: -220px;
  }
  
  .welcome-message {
    display: none;
  }
}

/* Top Navigation Layout Fixes */
.navbar-static-top {
  padding: 0 15px;
}

.navbar-static-top .d-flex {
  min-height: 50px;
}

.navbar-header {
  flex-shrink: 0;
}

.search-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-right {
  flex-shrink: 0;
}

.navbar-right .nav {
  margin: 0;
  display: flex;
  align-items: center;
}

/* Search box improvements */
.search-container .form-control {
  border: 1px solid #e7eaec;
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-container .form-control:focus {
  border-color: #1ab394;
  box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.1);
}

/* Minimize button styling */
.navbar-minimalize {
  background: none;
  border: none;
  padding: 10px 15px;
  margin-top: 8px;
  color: #1ab394;
  font-size: 18px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.navbar-minimalize:hover {
  background-color: rgba(26, 179, 148, 0.1);
}

.navbar-minimalize:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.3);
}

/* Responsive breakpoints for search and navigation */
@media (max-width: 575.98px) {
  .search-container {
    flex-grow: 0;
    min-width: 120px;
    margin: 0 5px;
  }
  
  .search-container .form-control {
    font-size: 14px;
    padding: 6px 10px;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .search-container {
    min-width: 200px;
    margin: 0 10px;
  }
}

/* Medium screens search adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
  .search-container {
    max-width: 300px;
    margin: 0 15px;
  }
  
  .search-container .form-control {
    padding: 8px 35px 8px 12px;
    height: 36px;
  }
}

/* Smooth transitions for all responsive changes */
.navbar-default,
#page-wrapper {
  transition: all 0.3s ease-in-out;
}

/* Focus states for accessibility */
.navbar-toggler:focus,
.navbar-minimalize:focus,
.search-container .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.3);
}

/* Large screen optimizations */
@media (min-width: 1200px) {
  .wrapper-content {
    padding: 20px 30px 56px !important;
  }
}

/* Smooth transitions for all screen sizes */
.navbar-static-side,
#page-wrapper {
  transition: all 0.3s ease-in-out !important;
}

/* Focus states for accessibility */
.navbar-static-side .nav > li > a:focus {
  background-color: rgba(26, 179, 148, 0.8) !important;
  outline: 2px solid #1ab394 !important;
  outline-offset: -2px !important;
  color: white !important;
}



