/*Add your own styles here:*/
/** start css for login and registration form**/
.bta-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    font-family: sans-serif;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.bta-form h2 {
    text-align: center;
    margin-bottom: 20px;
}
.bta-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.bta-form input[type="text"],
.bta-form input[type="email"],
.bta-form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.bta-form input[type="submit"] {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}
.bta-form input[type="submit"]:hover {
    background: #005a87;
}
/** end css for login and registration form **/
/** start css for dashboard **/
.logout-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #d63638;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
}

.logout-button:hover {
    background-color: #a52729;
}
/** end css for dashboard **/
/*** start css for school admin **/
.header-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.1rem;
}
.header-left{
    
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.header-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.header-right{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.license-info{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.license-label{
    font-size: 0.875rem;
    color: #6b7280;
}

.license-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
}
.purchase-btn {
    background: linear-gradient(135deg, #65cf6a 0%,#207a24  100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s;
}

.purchase-btn:hover {
    background-color: #059669;
}

.leaderboard-btn{
    background-color: #ffffff;
    color: rgba(0, 0, 0, 0.8);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.leaderboard-btn:hover{
    background-color: rgba(0, 0, 0, 0.1);
}

.student-view-btn{
    background-color: #ffffff;
    color: rgba(0, 0, 0, 0.8);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.student-view-btn:hover{
    background-color: rgba(0, 0, 0, 0.1);
}


/* Teacher Management Container */
.teacher-management-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.management-left{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.management-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.teacher-actions {
    display: flex;
    gap: 1rem;
}
.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: #9ca3af;
}

.action-btn.remove {
    color: #dc2626;
    border-color: #fecaca;
}

.action-btn.remove:hover {
    background-color: #fef2f2;
    border-color: #fca5a5;
}

.teacher-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-select {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left:  0.7rem;
    padding-right: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 150px;
}

.student-actions {
    display: flex;
    gap: 1rem;
}

.move-btn {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display:flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.move-btn:hover {
    background-color: #f9fafb;
    border-color:#9ca3af;
}

.remove-student-btn {
    background-color: white;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.remove-student-btn:hover {
    background-color: #fef2f2;
}

/* Tier section */

.tier{
    margin-top: 0.5rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
}
.btn-group{
    padding: 0.2rem;
    width: 100%;
    background-color: #d1d5db;
}
.btn{
    border: none !important;
    background-color: #d1d5db;
    color: black;
    border-radius:4px !important;
}
.btn-outline-secondary{
    border-radius:4px !important; 
}


/*Student progress Tables*/
.progress-sections {
    margin-top: 48px;
}

.progress-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 32px;
    overflow: hidden;
}

.progress-section .section-title {
    background: #f8f9fa;
    padding: 10px 15px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
}

.progress-table {
    width: 100%;
    overflow-x: auto;
}

.table-header {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px;
    /*grid-template-columns: 250px repeat(6, 1fr);*/
    /*grid-template-columns: 250px repeat(auto-fit, minmax(120px, 1fr));*/
    color: white;
    font-weight: 600;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-cell {
    padding: 16px 12px;
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    background: #3182ce;
}

.header-cell:last-child {
    border-right: none;
}

.student-col {
    text-align: left;
    padding-left: 24px;
}

.table-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px;
    /*grid-template-columns: 250px repeat(6, 1fr);*/
    /*grid-template-columns: 250px repeat(auto-fit, minmax(120px, 1fr));*/
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
    min-height: 60px;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
}



.student-name {
    font-weight: 500;
}

.student-name a {
    color: #2d3748;
}

.student-badge {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.fa-pen {
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
}

.fa-pen:hover {
    color: #4a5568;
}
.student-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.student-name {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.student-badge,
.student-info .fa-pen {
    flex-shrink: 0;
    margin-left: 8px;
}

.student-info .fa-pen {
    font-size: 14px;
    opacity: 0.8;
}



.status-cell {
    padding: 8px;
    display: flex;
    justify-content: center;
}

.status-dropdown {
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-width: 100px;
    text-align: center;
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 12px;
    /*padding-right: 28px;*/
    transition: all 0.2s ease;
}

.status-dropdown option {
    background-color: white;
    color: black;
}

/*option[value="not-started"] {
  background-color: white !important;
  color: black;
}
option[value="learned"] {
  background-color: black !important;
  color: white;
}
option[value="in-progress"] {
  background-color: orange !important;
  color: white;
}
option[value="complete"] {
  background-color: green !important;
  color: white;
}*/

.status-dropdown.notStarted {
    background-color: white;
    color: #2d3748;
    border: 1px solid black;
}

.status-dropdown.learned {
    background-color: #3182ce;
    color: white;
    border: 1px solid blue;
}

.status-dropdown.inProgress {
    background-color: #d69e2e;
    color: white;
    border: 1px solid rgb(122, 81, 3);
}

.status-dropdown.complete {
    background-color: #38a169;
    color: white;
    border: 1px solid green;
}


.status-dropdown:hover {
    opacity: 0.9;
}

.status-dropdown:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.status-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/*Add Student*/

.addstudent{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.studentadd{
    background-color:  #3b82f6;
    color: white;
    white-space: nowrap;
}
.studentadd:hover{
    background-color: rgba(66, 153, 225, 0.9);
    color: white;
}
/*** end css for school admin **/

/** css start for model popup **/
/* Modal Background Overlay */
.modal-backdrop.show {
  opacity: 0.8;
}
.modal-header {
    background-color: #fff;
    border-bottom: none !important;
   
}
form#add-teacher-form .form-control {
    box-shadow: none !important;
}
form#add-student-form .form-control {
    box-shadow: none !important;
}
/* Modal Content */
.modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: none;
}

/* Modal Header */
.modal-title {
  font-weight: 600;
  font-size: 1.25rem;
  color: #000;
}

/* Modal Body */
.modal-body {
  padding: 1.5rem;
  background-color: #ffffff;
}

/* Modal Footer */
.modal-footer {
  background-color: #fff !important;
  border-top:none !important;
}

/* Buttons */






/* Validation feedback */
.was-validated .form-control:invalid {
  border-color: #dc3545;
}

.was-validated .form-control:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
  font-size: 0.875rem;
  color: #dc3545;
}
.teacher-cancel-btn {
    padding: 13px 20px !important;
    border: 1px solid #d1d5db !important;
    color: #333 !important;
}
.teacher-cancel-btn:hover {
    padding: 13px 20px !important;
    border: 1px solid #d1d5db !important;
    color: #333 !important;
}
.card.no-student-found {
    margin: 30px 0px;
}
.remove_teacher_btn {
    background-color: #DC4C64 !important;
}
/** end css for model popup **/



/* ==================== Responsive Section ==================== */

/* Responsive adjustments for header-container */
@media (max-width: 992px) {
    body {
        margin: 1rem 2rem;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .header-left {
        text-align: center;
    }

    .header-subtitle{
        font-size: 1.25rem;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
    }

    .license-info {
        align-items: center;
        width: 100%;
    }

    .license-label{
        font-size: 1.25rem;
    }

    .license-count {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .purchase-btn,
    .leaderboard-btn,
    .student-view-btn {
        width: 33.3%;
        justify-content: center;
    }


}

@media (max-width: 576px) {
    body {
        margin: 1rem;
    }

    .header-container{
        flex-direction: column;
        align-items: stretch;
        gap:1rem;
    }

    .header-left{
        text-align: center;
    }

    .header-right{
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .header-subtitle {
        font-size: 0.75rem;
    }


    .license-info{
        align-items: center;
        width: 100%;
    }

    .license-count {
        font-size: 1.25rem;
        font-weight: 700;
    }

    .purchase-btn{
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        gap: 0.5rem;
        width: 50%;
    }
    .leaderboard-btn, .student-view-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}


/* Responsive CSS for Teacher Management Section */

/* Tablet & small laptop screens (≤ 992px) */
@media (max-width: 992px) {
    .teacher-management-container {
        flex-direction: row;
    }
    .teacher-controls,
    .student-actions,
    .teacher-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .student-actions{
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
    }

    .move-btn,.remove-student-btn{
        width: 48%;
    }

    .teacher-select {
        min-width: unset;
        width: 100%;
    } 
}
@media (min-width: 577px) and (max-width: 991px) {
 .management-right{
        width: 38%;
        display: flex;
        justify-content: end;

    }
.management-left {
    width: 59%;
}
  
}
@media (max-width: 1024px) {
.custom-dropdown {
    margin: 0 auto;
}
}
/* Mobile screens (≤ 576px) */
@media (max-width: 576px) {
    .teacher-management-container {
        flex-direction: row;
        gap: 1.5rem;
    }

    .management-left{
        width:50%;
    }

    .teacher-controls,
    .student-actions,
    .teacher-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .student-actions{
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
    }

    .move-btn,.remove-student-btn{
        width: 100%;
       font-size: 14px;
    }

    .teacher-select {
        min-width: unset;
        width: 100%;
    }

    .teacher-actions {
        justify-content: flex-start;
    }

    .action-btn {
        width: 100%;
        text-align: center;
	font-size: 14px;
    }
   button.logout-button {
             font-size: 14px;
        }
     .teacher-controls button {
         font-size: 14px;
          width: 100%;
      }
h2.management-title {
    font-size: 14px;
    margin: 0;
}
    .management-right{
        width: 50%;
        display: flex;
        justify-content: end;
    }
    .teacher-actions{
        width: 95%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        margin-top: 60px;
    }
}

/* Responsive CSS for Teacher Management Section */
@media (max-width: 576px) {
     .tier {
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
    }

    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-group .btn {
        width: 100%;
        text-align: center;
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
}

/* 📱 TABLET VIEW: 769px to 992px */
@media (min-width: 769px) and (max-width: 992px) {
    .progress-section {
        overflow-x: auto;
        width: 100%;
        position: relative;
    }

    .section-title {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #f8f9fa;
        padding: 20px 24px;
        font-size: 18px;
        font-weight: 600;
        color: #2d3748;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
	}
}
button#add-drill {
    margin-bottom: 10px;
}
button#add-challenge-drill {
    margin-bottom: 10px;
}
.drill-handle {
  cursor: move;
  margin-right: 8px;
  color: #555;
}
.drill-row, .challenge-drill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px;
  background: #f9f9f9;
  border: 1px solid #ddd;
}

/*css start for challenge belt*/
.hero_challenge_top {
    display: flex;
    justify-content: center;
    padding: 15px 20px;
}
.belt_image_title {
    display: flex;          
    align-items: center;        
    gap: 5px;                  
    background-color: #0d6efd; 
    border-radius: 50px;
    padding: 8px 15px;
}

.hero_challenge_image img {
    width: 20px; 
    height: 20px;
    object-fit: contain;
}

.hero_challenge_belt span {
    color: #fff;
    font-weight: bold;
    font-size: 12px;

}

@media (max-width: 600px) {
    .belt_image_title {
        flex-direction: column;
        text-align: center;
    }

    .hero_challenge_belt span {
        margin-top: 8px;
    }
}

/*css end for challenge belt*/
@media (min-width: 993px) and (max-width: 1280px) {
.teacher-management-container {
    display: block;
}
  .management-right {
    padding-top: 20px;
}
}
