* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Nunito", sans-serif;
    background-color: #f5f7fb;
    color: #202c4b;
    overflow-x: hidden;
    font-size: 14px;
    transition: all 0.3s ease;
}
a {
    text-decoration: none;
    color: inherit;
}

/* Sidebar Styles */
.sidebar {
    background: #ffffff;
    color: var(--primary-dark);
    height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    white-space: nowrap;
}

.logo-icon {
    font-size: 1.8rem;
    margin-right: 10px;
    min-width: 30px;
    text-align: center;
}

.logo-text {
    transition: all 0.3s ease;
    opacity: 1;
    width: auto;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    display: none;
}

.toggle-btn {
    background: var(--primary-dark);
    border: none;
    color: white;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: var(--primary);
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #6a7287;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    margin: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.menu-item:hover,
.menu-item.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.menu-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.menu-icon {
    font-size: 14px;
    width: 24px;
    text-align: center;
    margin-right: 12px;
    min-width: 24px;
}

.menu-text {
    transition: all 0.3s ease;
    opacity: 1;
    width: auto;
}

.sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    display: none;
}

.menu-badge {
    background: var(--warning);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.7rem;
    margin-left: auto;
    transition: all 0.3s ease;
}

.sidebar.collapsed .menu-badge {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.2rem;
    min-width: 40px;
}

.user-details {
    transition: all 0.3s ease;
    opacity: 1;
    width: auto;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
    display: none;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Top Bar Styles */
.top-bar {
    background: white;
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.sidebar.collapsed ~ .top-bar {
    left: var(--sidebar-collapsed);
}

.search-container {
    position: relative;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: var(--gray-light);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(80, 110, 228, 0.1);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.user-menu:hover {
    background: var(--primary-light);
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info-small .user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info-small .user-role {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 70px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    min-height: calc(100vh - 70px);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.content-header {
    margin-bottom: 20px;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.breadcrumb-item.active {
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

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

.stat-students .stat-icon {
    background: rgba(80, 110, 228, 0.1);
    color: var(--primary);
}

.stat-teachers .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-parents .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-guardians .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .top-bar,
    .main-content {
        left: 0;
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block !important;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.table-responsive {
    overflow: auto;
}
.login-banner {
    height: 100vh;
    width: 100%;
    object-fit: cover;
}
.auth .auth-form-light {
    background: #ffffff;
}
.auth-form.text-left.py-5.px-sm-5 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 95%;
}
.auth .brand-logo {
    margin-bottom: 2rem;
}
.auth .brand-logo img {
    width: 150px;
}
.auth form .form-group {
    margin-bottom: 1.5rem;
}

.auth form .form-group .form-control {
    background: transparent;
    border-radius: 0;
    font-size: 0.9375rem;
}
.auth form .auth-form-btn {
    line-height: 1.5;
    width: 100%;
}

div#filterDropdownMenu {
    width: 365px !important;
    z-index: 2024;
}
form#filterForm .form-label {
    font-size: 12px;
    font-weight: 500 !important;
}
.modal-open-custom {
    overflow: hidden !important;
    padding-right: var(--bs-gutter-x, 0.5rem); /* avoid layout shift */
}
.filter-options {
    max-height: 40vh;
    overflow-y: scroll;
}
.avatar.avatar-md {
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    font-size: 0.8rem;
}
.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}
.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    font-size: 0.939rem !important;
    font-weight: 600 !important;
    border-top: unset !important;
    border-left: unset !important;
    border-right: unset !important;
}
.nav-link {
    color: unset !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}
.tl-item .avatar {
    z-index: 2 !important ;
}

.circle {
    border-radius: 500px !important ;
}

.timeline {
    position: relative !important ;
    border-color: rgba(160, 175, 185, 0.15) !important ;
    margin: 0 !important ;
}
.block {
    border-width: 0 !important ;
    border-radius: 0.25rem !important ;
}
.tl-item {
    border-radius: 3px !important ;
    position: relative !important ;
    display: -ms-flexbox !important ;
    display: flex !important ;
}
.tl-item > * {
    padding: 10px !important ;
}
.tl-item .avatar {
    z-index: 2 !important ;
}
.tl-item:last-child .tl-dot:after {
    display: none !important ;
}
.tl-item.active .tl-dot:before {
    border-color: var(--primary) !important ;
    box-shadow: 0 0 0 4px rgba(68, 139, 255, 0.2) !important ;
}
.tl-item:last-child .tl-dot:after {
    display: none !important ;
}
.tl-item.active .tl-dot:before {
    border-color: var(--primary) !important ;
    box-shadow: 0 0 0 4px rgba(68, 139, 255, 0.2) !important ;
}
.tl-dot {
    position: relative !important ;
    border-color: rgba(160, 175, 185, 0.15) !important ;
}
.tl-dot:after,
.tl-dot:before {
    content: "" !important ;
    position: absolute !important ;
    border-color: inherit !important ;
    border-width: 2px !important ;
    border-style: solid !important ;
    border-radius: 50% !important ;
    width: 10px !important ;
    height: 10px !important ;
    top: 15px !important ;
    left: 50% !important ;
    transform: translateX(-50%) !important ;
}
.tl-dot:after {
    width: 0 !important ;
    height: auto !important ;
    top: 25px !important ;
    bottom: -15px !important ;
    border-right-width: 0 !important ;
    border-top-width: 0 !important ;
    border-bottom-width: 0 !important ;
    border-radius: 0 !important ;
}
.tl-item.active .tl-dot:before {
    border-color: var(--primary) !important ;
    box-shadow: 0 0 0 4px rgba(68, 139, 255, 0.2) !important ;
}
.tl-dot {
    position: relative !important ;
    border-color: rgba(160, 175, 185, 0.15) !important ;
}
.tl-dot:after,
.tl-dot:before {
    content: "" !important ;
    position: absolute !important ;
    border-color: inherit !important ;
    border-width: 2px !important ;
    border-style: solid !important ;
    border-radius: 50% !important ;
    width: 10px !important ;
    height: 10px !important ;
    top: 15px !important ;
    left: 50% !important ;
    transform: translateX(-50%) !important ;
}
.tl-dot:after {
    width: 0 !important ;
    height: auto !important ;
    top: 25px !important ;
    bottom: -15px !important ;
    border-right-width: 0 !important ;
    border-top-width: 0 !important ;
    border-bottom-width: 0 !important ;
    border-radius: 0 !important ;
}
.tl-content p:last-child {
    margin-bottom: 0 !important ;
}
.tl-content {
    width: 100% !important ;
}
.tl-date {
    font-size: 0.85em !important ;
    margin-top: 2px !important ;
}

.b-primary {
    border-color: var(--primary) !important;
}
.task-card span {
    font-size: 12px !important;
}
.task-card:hover {
    box-shadow: var(--bs-box-shadow) !important;
}
.document-box {
    margin-bottom: 1rem;
}
.document-box:last-child {
    margin-bottom: 0;
}
.avatar.avatar-xxl {
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--primary);
    border-radius: 50%;
    line-height: 5rem;
    font-size: 1.5rem;
}
.drag-upload-btn {
    font-size: 12px;
    font-weight: 600;
    background: #fff;
    border: 1px dashed var(--primary);
    border-radius: 5px;
    margin: 0 12px 10px 0;
    padding: 6px 16px;
    position: relative;
    transition: all 0.5s;
}
.drag-upload-btn input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}
.select2-container--default .select2-selection--single {
    border-color: #e9edf4 !important;
    color: #202c4b !important;
    background-color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    border-radius: 5px !important;
    padding: 0.5rem 0.625rem !important;
    height: 38px !important;
    transition: all 0.5s !important;
    display: flex;
    align-items: center;
}

label.form-check-label {
    font-size: 12px;
}
