@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

::after,
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

body {
    font-family: 'Poppins', sans-serif;
}

.wrapper {
    display: flex;
}

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    background-color: #f9fafc;
    min-width: 0;
}

.content {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    padding: 1rem;
    background-color: #f8f9fa;
}

.insta-card {
    border: 0;
    border-radius: 0.5rem;
    background-color: #fefefe;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#sidebar {
    width: 70px;
    min-width: 70px;
    z-index: 1000;
    transition: all .25s ease-in-out;
    background-color: #ffffff;
    /* background-color: #0e2238; */
    /* background-color: #89C23F; */
    display: flex;
    flex-direction: column;
}

#sidebar.expand {
    width: 260px;
    min-width: 260px;
}

.toggle-btn {
    background-color: transparent;
    cursor: pointer;
    border: 0;
    padding: 1rem 1.5rem;
}

.toggle-btn i {
    font-size: 1.5rem;
    color: #FFF;
}

.sidebar-logo {
    margin: auto 0;
}

.sidebar-logo a {
    color: #FFF;
    font-size: 1.15rem;
    font-weight: 600;
}

#sidebar:not(.expand) .sidebar-logo,
#sidebar:not(.expand) a.sidebar-link span {
    display: none;
}

#sidebar.expand .sidebar-logo,
#sidebar.expand a.sidebar-link span {
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.sidebar-nav {
    padding: 2rem 0;
    flex: 1 1 auto;
}

a.sidebar-link {
    padding: .625rem 1.625rem;
    /* color: #FFF; */
    color: #0e2238;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.sidebar-link i,
.dropdown-item i {
    font-size: 1.1rem;
    margin-right: .75rem;
}

a.sidebar-link:hover {
    background-color: rgba(255, 255, 255, .075);
    /* background-color: blue; */
    border-left: 3px solid #3b7ddd;
}

.sidebar-item {
    position: relative;
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 70px;
    /* background-color: #0e2238; */
    background-color: #699d3b;
    padding: 0;
    min-width: 15rem;
    display: none;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown+.sidebar-dropdown {
    display: block;
    max-height: 15em;
    width: 100%;
    opacity: 1;

}

.sidebar-item:hover{
    background-color: #699d3b;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 .075rem .075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all .2s ease-out;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
    transition: all .2s ease-out;
}

.navbar {
    background-color: #fefefe;
    box-shadow: 0 0 2rem 0 rgba(33, 37, 41, .1);
}

.navbar-expand .navbar-collapse {
    min-width: 200px;
}

.avatar {
    height: 40px;
    width: 40px;
}

.sidebar-toggler {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}

.chevron-icon {
  transition: transform 0.3s ease;
}

#sidebar:not(.expand) .chevron-icon {
  transform: rotate(180deg); /* Points to the right */
}

/* Hide sidebar text (e.g., Logout) when sidebar is collapsed */
#sidebar:not(.expand) .sidebar-footer .sidebar-text {
    display: none;
}

/* Show logo in navbar when sidebar is collapsed */
.sidebar-collapsed #topbar-logo {
    display: block !important;
    opacity: 1;
}

/* Optional: hide when not collapsed (redundant with d-none, but safe) */
#topbar-logo {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge-app {
    background-color: #0e2238; /* Custom blue */
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    font-weight: 600; /* Makes text bold */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Adds shadow */
}

.badge-float {
    background-color: #699d3b; /* Custom green */
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-outline-secondary i {
  font-size: 0.9rem;
}


/* --- Mobile Offcanvas (Matching Desktop Sidebar) --- */

.bg-sidebar {
  /* background-color: #0e2238; same as sidebar dark blue */
  background-color: #ffffff;
}

.offcanvas {
  border-right: none;
  font-family: 'Poppins', sans-serif;
}

/* .offcanvas-header {
  background-color: #0e2238;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
} */
.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
   padding: 10px 15px;
}

.offcanvas-header img {
  display: block;
  max-height: 36px;
  width: auto;
}


.offcanvas-body {
  background-color: #f8f9fb;
  padding-top: 1rem;
}

/* Fix mobile offcanvas sidebar width */
.offcanvas.offcanvas-start {
  width: 280px !important; /* adjust as needed (250–320px looks good) */
  max-width: 85%; /* keeps it responsive on very small screens */
  background-color: #f8f9fa; /* ensure it doesn't inherit dark full-screen bg */
}

/* Optional: ensure body content isn’t pushed weirdly */
body.offcanvas-backdrop {
  overflow: hidden;
}

/* Optional: tidy the offcanvas header and body */
/* .offcanvas-header {
  background-color: #0e2238;
  padding: 10px 15px;
} */

/* .offcanvas-body {
  padding: 15px;
} */


.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #0e2238;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link-custom i {
  font-size: 1.2rem;
  color: #0e2238;
  transition: color 0.2s ease;
}

.nav-link-custom:hover {
  /* background-color: #e9efff; */
  background-color: #699d3b;
  color: #0e2238;
  transform: translateX(3px);
}

.nav-link-custom:hover i {
  color: #0d6efd;
}

.btn-link.nav-link-custom {
  width: 100%;
  text-align: left;
}


@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}


@media (min-width: 768px) {}
