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

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1d21;
    color: #e4e6eb;
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #212529;
    border-right: 1px solid #343a40;
    padding-top: 20px;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-brand i {
    color: #3498db;
    margin-right: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    padding: 10px 25px;
    margin-top: 15px;
    letter-spacing: 1px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #3498db;
}

.sidebar-menu li a i {
    margin-right: 15px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 70px;
    background-color: #212529;
    border-bottom: 1px solid #343a40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

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

.search-bar input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 8px 15px 8px 40px;
    color: #fff;
}

.search-bar input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-icon {
    color: #adb5bd;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.topbar-icon:hover {
    color: #ffffff;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Content Area */
.content {
    padding: 30px;
    flex: 1;
}

/* Cards */
.card {
    background-color: #212529;
    border: 1px solid #343a40;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    margin-bottom: 25px;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #343a40;
    padding: 15px 20px;
    font-weight: 600;
    color: #ffffff;
}

.card-body {
    padding: 20px;
}

/* Dashboard Stats Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.stat-title {
    font-size: 0.9rem;
    color: #adb5bd;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.stat-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-badge.success { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.stat-badge.primary { background-color: rgba(52, 152, 219, 0.2); color: #3498db; }
.stat-badge.warning { background-color: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.stat-badge.danger { background-color: rgba(231, 76, 60, 0.2); color: #e74c3c; }

/* Tables */
.table {
    color: #e4e6eb;
}
.table-hover tbody tr:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.05);
}
.table-light, .table th {
    background-color: #2a2e33 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #343a40;
    border-top: none;
}
.table td {
    border-bottom: 1px solid #343a40;
    vertical-align: middle;
}

/* Forms */
.form-control, .form-select {
    background-color: #1a1d21;
    border: 1px solid #343a40;
    color: #ffffff;
}
.form-control:focus, .form-select:focus {
    background-color: #212529;
    border-color: #3498db;
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}
.form-label {
    color: #adb5bd;
}

/* Buttons */
.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}
.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}
.btn-outline-secondary {
    color: #adb5bd;
    border-color: #adb5bd;
}
.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Custom list group */
.list-group-item {
    background-color: transparent;
    border-color: #343a40;
    color: #e4e6eb;
}

/* Badges */
.bg-light { background-color: #343a40 !important; color: #fff !important; }
.text-dark { color: #fff !important; }

/* Page title */
.page-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* Tree View Styles */
.tree-container {
    background-color: #212529;
    border: 1px solid #343a40;
    border-radius: 10px;
    padding: 25px;
}

.tree-list, .tree-list ul {
    list-style: none;
    padding-left: 25px;
    margin: 0;
    position: relative;
}

.tree-list ul::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 15px;
    left: 10px;
    border-left: 2px dashed #495057;
}

.tree-item {
    position: relative;
    margin-top: 10px;
}

.tree-item::before {
    content: '';
    position: absolute;
    top: 18px;
    left: -15px;
    width: 15px;
    border-top: 2px dashed #495057;
}

.tree-content {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 6px;
    background-color: #1a1d21;
    border: 1px solid #343a40;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.tree-content:hover {
    background-color: #2a2e33;
    border-color: #3498db;
    transform: translateX(3px);
}

.tree-toggler {
    margin-right: 8px;
    font-size: 0.8rem;
    color: #adb5bd;
    transition: transform 0.2s;
}

.tree-toggler.collapsed {
    transform: rotate(-90deg);
}

.tree-node-icon {
    font-size: 1rem;
    margin-right: 10px;
}

.tree-branch .tree-node-icon { color: #17a2b8; }
.tree-head .tree-node-icon { color: #0d6efd; }
.tree-incharge .tree-node-icon { color: #6f42c1; }
.tree-project .tree-node-icon { color: #198754; }
.tree-student .tree-node-icon { color: #ffc107; }

.tree-node-title {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.95rem;
}

.tree-node-meta {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-left: 10px;
}

/* Mobile App UI Styles */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .topbar {
        padding: 0 15px;
    }

    .search-bar {
        width: 180px;
    }

    .content {
        padding: 15px;
    }
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #212529;
    border-top: 1px solid #343a40;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s ease;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item.active {
    color: #3498db;
}