/* 1. LOGIN PAGE & ANIMATIONS */
.auth-card .form-control:focus {
  box-shadow: none;
  border-color: var(--primary-color);
  background-color: #ffffff;
}

.auth-card .input-group-text {
  border-right: none;
}

/* RGB TEXT EFFECT */
.text-rgb {
  background: linear-gradient(
    90deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  background-size: 400%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rgbFlow 10s linear infinite;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

@keyframes rgbFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* 2. SIDEBAR DESIGN */
.sidebar-brand {
  height: 90px;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand .brand-text h4 {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
}

#sidebar-wrapper {
  min-height: 100vh;
  width: 250px;
  margin-left: 0;
  background-color: var(--sidebar-bg);
  color: var(--text-light);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.sidebar-profile {
  padding-top: 20px;
  border-top: none;
  padding: 30px 20px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.2s ease;
}

.sidebar-profile img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 15px;
}

.profile-info h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.profile-info small {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-top: 5px;
}
.profile-info .id-text {
  color: var(--primary-color);
  font-weight: 600;
}

.sidebar-label {
  padding: 10px 25px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#sidebar-wrapper .list-group-item {
  background-color: transparent;
  color: var(--text-light);
  border: none;
  padding: 12px 25px;
  font-weight: 500;
  border-left: 4px solid transparent;
  display: flex;
  align-items: center;
}

#sidebar-wrapper .list-group-item i {
  width: 25px;
  font-size: 1.2rem;
  margin-right: 10px;
  text-align: center;
  color: var(--text-muted);
}
#sidebar-wrapper .list-group-item:hover {
  background-color: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--text-muted);
}
#sidebar-wrapper .list-group-item.active {
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  border-left-color: var(--primary-color);
}
#sidebar-wrapper .list-group-item.active i {
  color: var(--primary-color);
}

/* 3. COMPONENTS (Cards, Charts, Tables) */
#page-content-wrapper {
  width: 100%;
  transition: all 0.25s ease;
}

.stat-card {
  background: #f5f5f5;
  border: none;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
}

.chart-container {
  background: #f5f5f5;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.table-custom thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
}
.table-custom tbody tr {
  transition: background-color 0.2s;
}
.table-custom tbody tr:hover {
  background-color: #f1f5f9;
}

.table-custom img {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
}

/* 4. NAVBAR STYLING */
.navbar-teal {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  background-color: var(--primary-color) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.navbar-teal .navbar-brand,
.navbar-teal .nav-link,
.navbar-teal i {
  color: #fff !important;
}
.navbar-teal .btn-light {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
}

/* 5. Desktop Mini Sidebar (Toggled via JavaScript) */
/* When the 'sb-sidenav-collapsed' class is added to the body*/

/* ...shrink the sidebar width. */
body.sb-sidenav-collapsed #sidebar-wrapper {
  width: 70px;
}

/* hide all text elements within the sidebar. */
body.sb-sidenav-collapsed .sidebar-profile,
body.sb-sidenav-collapsed .sidebar-label,
body.sb-sidenav-collapsed .menu-text,
body.sb-sidenav-collapsed .sidebar-brand .brand-text {
  display: none !important;
}

/* center the icons in the collapsed sidebar. */
body.sb-sidenav-collapsed #sidebar-wrapper .list-group-item {
  padding: 15px 0;
  justify-content: center;
}
body.sb-sidenav-collapsed #sidebar-wrapper .list-group-item i {
  margin-right: 0;
  font-size: 1.4rem;
}
body.sb-sidenav-collapsed #page-content-wrapper {
  margin-left: 0;
}

/* 6. FOOTER STYLES */
.site-footer {
  font-size: 0.9rem;
  position: relative;
  z-index: 10;
}
.hover-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.hover-link:hover {
  color: var(--primary-color) !important;
  padding-left: 5px;
}

.social-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(243, 243, 243, 0.725);
}
.social-btn:hover {
  color: #fff;
  transform: translateY(-3px);
  border-color: transparent;
}
.social-btn.facebook:hover {
  background-color: #1877f2;
}
.social-btn.instagram:hover {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}
.social-btn.twitter:hover {
  background-color: #0b0b0b;
}
.social-btn.linkedin:hover {
  background-color: #0077b5;
}

/* 7. MOBILE FIXES (Dropdowns & Navbar) */

.navbar {
  overflow: visible !important;
  position: relative;
  z-index: 1060;
}

.navbar .dropdown-menu {
  position: absolute !important;
  z-index: 2000 !important;
  right: 0;
  left: auto;
  min-width: 200px;
  margin-top: 10px;
}

/* 8. MOBILE MEDIA QUERY (Max Width 768px) */
@media (max-width: 768px) {
  /* Initially hide the sidebar off-screen to the left. */
  #sidebar-wrapper {
    margin-left: -250px;
    position: fixed;
    height: 100vh;
    z-index: 1080 !important;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
  }

  /* A backdrop for when the sidebar is open on mobile. */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1070 !important;
    backdrop-filter: blur(2px);
  }
  /* When 'sb-sidenav-open' is on the body, slide the sidebar into view. */
  body.sb-sidenav-open #sidebar-wrapper {
    margin-left: 0;
  }

  .container-fluid.px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .navbar-teal {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .site-footer .col-6 {
    width: 50% !important;
  }

  .col-md-6.mb-4 {
    margin-bottom: 1.5rem !important;
  }
}
