/** Font Famaily **/
h1, h2, h3, h4, h5, h6{
  font-family: 'Amatic SC', cursive;
}
html, body{
  width: 100%;
  overflow-x: hidden;
}

/* General body and font */
body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #f8fafc;
    color: #222;
}

/** Custom Admin Template Design **/

/* Wrapper Design */
main{
  width: 100%;
  display: flex;
  flex-direction: column;
}
main>nav,
main>footer
{
  width: 100%;
  flex-shrink: 1;
}
main>div#main-wrapper
{
  width: 100%;
  flex-grow: 1;
  height: calc(100%);
  overflow: auto;
}

/* Customizing Top bar Design */
/* NavBar Brand */
#navBarBrand-container{
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  padding: 0 15px;
  justify-content: center;
  align-items: center;
  background: #202020;
  min-height: calc(100%);
}
#navBarBrand-container .navbar-brand{
  white-space: break-spaces;
  font-size: 1.5rem;
  font-weight: bolder;
  text-align: center;
}
#navBarBrand-container * {
  color:#fff;
}

/* Topbar title and menu container design */
#navBarMenu-container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px 15px 10px;
}
#navBarMenu .ct-top-nav-left{
  width: 60%;
}
#navBarMenu .ct-top-nav-right{
  width: 40%;
}
#navBarMenu-container a{
  white-space: break-spaces;
}
button#SideBarToggle {
  background: transparent;
  border: unset;
}
button#SideBarToggle *{
  color: #2d2d2d;
}
#main-wrapper,
#navBarMenu-container,
#navBarBrand-container,
#footer{
  transition: width .3s ease-in-out,  margin .3s ease-in-out;
}

/* Sidebar Navigation */
#sidebarNav{
  width: 220px;
  position: fixed;
  left:0;
  min-height: 60vh;
  background: #202020;
  transition: width .3s ease-in-out;
  opacity: 0;
  overflow: hidden;
}
#sidebarNav .nav-menu{
  width: calc(100%);
  overflow: auto;
  padding: 0;
}
#sidebarNav .nav-menu .nav-item:nth-child(1) {
  border-top: 2px solid #505050;
}
#sidebarNav .nav-menu .nav-item {
    min-height: 55px;
    display: flex;
    list-style: none;
    padding: 0 10px;
    align-items: center;
    border-bottom: 1px solid #505050;
}
#sidebarNav .nav-menu .nav-item:hover {
  background: #363636;
}
#sidebarNav .nav-menu .nav-item.active {
  background: #fff;
}
#sidebarNav .nav-menu .nav-item>.nav-icon {
    flex-shrink: 1;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
}
#sidebarNav .nav-menu .nav-item>.nav-link {
    flex-grow: 1;
    font-size: 1.0rem;
    font-weight: 400;
}
#sidebarNav .nav-menu .nav-item>.nav-link,
#sidebarNav .nav-menu .nav-item>.nav-icon
{
  color: #ededed;
}
#sidebarNav .nav-menu .nav-item.active * {
  color: #363636;
}
footer#footer {
  box-shadow: 0px 0px 20px #d7d7d7;
}

/* Sidebar */
nav.bg-white {
    border-radius: 18px 0 0 18px;
    box-shadow: 0 2px 24px 0 rgba(0,0,0,0.04);
    min-height: 100vh;
    transition: box-shadow 0.3s;
}
nav.bg-white .nav-link {
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    font-size: 1rem;
}
nav.bg-white .nav-link.active,
nav.bg-white .nav-link:hover {
    background: linear-gradient(90deg, #2563eb 60%, #38bdf8 100%);
    color: #fff !important;
    box-shadow: 0 2px 8px 0 rgba(56,189,248,0.10);
}
nav.bg-white .fa {
    opacity: 0.85;
}

/* Sidebar branding */
nav .fs-4 {
    font-family: 'Amatic SC', cursive;
    letter-spacing: 1px;
    font-size: 2rem;
}

/* Dashboard Cards */
/* Floating and hovering cards */
.card {
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 16px 0 rgba(56,189,248,0.10);
    transition: box-shadow 0.25s, transform 0.25s;
    position: relative;
    z-index: 1;
}
.card:hover {
    box-shadow: 0 8px 32px 0 rgba(56,189,248,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.07);
    transform: translateY(-8px) scale(1.03);
}
.card .card-body {
    padding: 1.5rem 1.2rem;
}
.card .rounded-circle {
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card .fa-2x {
    font-size: 2.2rem;
    opacity: 0.95;
}
.card .fw-bold {
    font-size: 1.6rem;
}
.card .text-muted {
    font-size: 0.95rem;
}

/* Make the form card float and hover */
.card.student-form-card {
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 16px 0 rgba(56,189,248,0.10);
}
.card.student-form-card:hover {
    box-shadow: 0 8px 32px 0 rgba(56,189,248,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.07);
    transform: translateY(-4px) scale(1.01);
}

/* Wider and more modern card */
.student-form-card {
    border-radius: 20px;
    box-shadow: 0 4px 32px 0 rgba(56,189,248,0.13), 0 1.5px 8px 0 rgba(0,0,0,0.07);
    background: #fff;
    border: none;
    transition: box-shadow 0.2s, transform 0.2s;
    padding-bottom: 1rem;
}
.student-form-card:hover {
    box-shadow: 0 8px 40px 0 rgba(56,189,248,0.18), 0 2px 12px rgba(37,99,235,0.10);
    transform: translateY(-4px) scale(1.01);
}
.student-form-card .card-header {
    background: linear-gradient(90deg, #2563eb 60%, #38bdf8 100%);
    color: #fff;
    border-radius: 20px 20px 0 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
}
.student-form-card .form-label {
    font-weight: 500;
    color: #2563eb;
}
.student-form-card input,
.student-form-card select {
    border-radius: 8px !important;
    border: 1.5px solid #e0e7ef;
    font-size: 1rem;
}
.student-form-card input:focus,
.student-form-card select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.15rem rgba(56,189,248,0.15);
}
.student-form-card .btn-primary {
    background: linear-gradient(90deg, #2563eb 60%, #38bdf8 100%);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.student-form-card .btn-outline-primary {
    border-radius: 20px;
}
.student-form-card .btn-outline-primary:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Chart Card */
.card-header {
    background: transparent;
    border-bottom: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
}

/* Navbar */
.navbar {
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.03);
}
.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

/* Footer */
footer {
    margin-top: 2rem;
    color: #888;
    font-size: 0.95rem;
}
.footer-fixed {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 8px rgba(56,189,248,0.07);
}
body, html {
    width: 100%;
}
.flex-grow-1.p-4 {
    padding-bottom: 60px !important; /* Add space for the footer */
}

/* Customize Admin Template in Tablets, mobile, and smaller screens */
@media (max-width:768px){
  #TopNav{
    display: flex;
    height: auto;
  }
  #navBarBrand-container,
  #navBarMenu-container,
  #footer
  {
    width: 100% !important;
  }
  #navBarBrand-container{
    min-height: unset;
  }
  #sidebarNav{
    z-index: 99;
    box-shadow: 0px 2px 5px #000;
  }
  #sidebarNav .nav-menu .nav-item.active {
    border-top-left-radius: unset;
    border-bottom-left-radius: unset;
    background: #fff;
  }
}
@media (max-width:350px){
  #sidebarNav{
    width: 100%;
  }
}
@media (max-width: 991px) {
    nav.bg-white {
        width: 100%;
        min-height: auto;
        border-radius: 0;
        margin-bottom: 1rem;
    }
    .d-flex {
        flex-direction: column !important;
    }
    .flex-grow-1 {
        padding: 1rem !important;
    }
}

/* Sidebar responsive toggle */
#sidebar {
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 250px;
        z-index: 1050;
        background: #fff;
        box-shadow: 0 2px 24px 0 rgba(0,0,0,0.08);
        transform: translateX(-100%);
    }
    #sidebar.active {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.15);
        z-index: 1049;
    }
    .sidebar-toggle-btn {
        display: inline-flex !important;
    }
    .flex-grow-1 {
        padding: 1rem !important;
    }
    .d-flex {
        flex-direction: column !important;
    }
}
@media (min-width: 992px) {
    .sidebar-toggle-btn {
        display: none !important;
    }
    .sidebar-backdrop {
        display: none !important;
    }
    #sidebar {
        transform: none !important;
        position: static;
        height: auto;
        box-shadow: 0 2px 24px 0 rgba(0,0,0,0.04);
    }
}

/* Horizontal scroll for dashboard cards on mobile */
.dashboard-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 767.98px) {
    .dashboard-scroll-x .row {
        flex-wrap: nowrap !important;
    }
    .dashboard-scroll-x .col-md-3 {
        min-width: 260px;
        flex: 0 0 auto;
    }
    .dashboard-scroll-x {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Scrollable form card on mobile */
@media (max-width: 767.98px) {
    .student-form-card {
        min-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    .student-form-scroll {
        flex: 1 1 auto;
        max-height: 70vh;
        overflow-y: auto;
        padding-bottom: 1rem;
    }
}

/* Hide effect for the download classlist form */
#download-classlist-form {
    transition: opacity 0.3s, visibility 0.3s;
}
#download-classlist-form.hide-form {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
}
