* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "montserrat-light";
}

#header {
    width: 100%;
    float: left;
    margin-bottom: 30px;
}

.header-top {
    width: 100%;
    float: left;
    background: #424951;
    color: #fff;
    padding: 0 20px;
}

.head-left {
    width: auto;
    float: left;
    padding: 8px 0;
}

    .head-left a {
        line-height: 10px;
        display: inline-block;
        padding: 0 5px;
        border-right: 1px solid #fff;
        color: #fff;
        font-size: 12px;
        text-decoration: none;
        position: relative;
        transition: all 0.4s ease;
    }

        .head-left a:last-child {
            border: none;
        }

        .head-left a:hvoer {
            opacity: 0.8;
        }

        .head-left a.login {
            color: #ffba00;
        }

        .head-left a.icon-cntct {
            position: relative;
            padding-left: 30px;
            box-sizing: border-box;
        }



.icon-whtsapp::before {
    left: 10px;
    top: -2px;
    width: 15px;
    height: 15px;
    position: absolute;
    content: '';
    display: block;
    background: url('images/icon-whtsapp.png') no-repeat left;
    background-size: auto auto;
    background-size: 100%;
}

.head-left a:hover {
    opacity: 0.8;
}

.head-right {
    float: right;
    width: auto;
}

    .head-right ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .head-right li {
        margin: 0;
        display: inline-block;
        float: left;
    }

        .head-right li a {
            position: relative;
            display: block;
            margin: 0;
            padding: 0 10px;
            font-size: 18px;
            color: #fff;
            padding-top: 5px;
        }

            .head-right li a:hover {
                color: #ffba00;
            }

.main-header {
    background: #fff;
    padding: 0 20px;
    border-bottom:#aaa solid  thin;
    width: 100%;
    float: left;
}

    .main-header .logo {
        float: left;
        width: 242px;
        margin: 15px 15px;
    }

        .main-header .logo img {
            width: 100%;
        }

    .main-header h2 {
        font-family: Montserrat;
        font-size: 25px;
        float: right;
        font-weight: normal;
        color: var(--primary-color);
        margin-top: 30px;
    }

#footer {
    width: 100%;
    float: left;
    margin-top: 30px;
    background: #333;
    text-align: center;
}

    #footer .container {
        margin: auto;
    }

.ftr-light, .ftr-dark {
    width: 100%;
    float: left;
}

.ftr-dark {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
}

.ftr-logo {
    width: 100%;
    float: left;
    text-align: center;
    margin: 20px 0 0;
}

    .ftr-logo img {
        width: 200px;
    }

#footer .span-3 {
    display: inline-block;
    vertical-align: top;
    width: 30%;
    padding: 30px;
}

    #footer .span-3 h3 {
        color: #ffab00;
        font-family: montserrat;
        font-weight: normal;
        font-size: 16px;
    }

    #footer .span-3, #footer .span-3 a {
        color: #ccc;
        text-decoration: none;
        font-family: "open-sans";
    }

        #footer .span-3 strong {
            display: block;
            color: var(--primary-color);
            font-size: 17px;
            font-family: montserrat;
            font-weight: normal;
        }

.ftr-dark {
    padding: 20px 0;
}


.input-design {
    width: 100%;
    float: left;
    padding: 7px 10px;
    box-sizing: border-box;
    margin-top: 7px;
    border: #ccc solid thin;
    border-radius: 7px;
}

/* Grade history result dashboard */
.grade-dashboard, .detailed-results {
    width: 100%;
    max-width: 1216px;
    margin-left: auto;
    margin-right: auto;
    font-family: "montserrat";
    color: #1e293b;
}

.student-card {
    width: 100%;
    margin: 0 0 22px;
    border: 1px solid #e2e8f0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
    
}

    .student-card td {
        border: 0 !important;
        padding: 10px 28px !important;
    }

    .student-card .student-primary {
        padding-top: 25px !important;
        padding-bottom: 24px !important;
    }

.info-label, .total-backlogs span, .summary-item span {
    display: block;
    color: #666;
    font-size: 13px;
    font-family: "montserrat-light";
    margin-bottom: 5px;
}

.student-name {
    display: block;
    color: #0f172a;
    font-size: 26px;
    line-height: 1.2;
}

.course-name {
    display: block;
    color: #666;
    font-size: 15px !important;
    margin-top: 7px;
}

.cgpa-cell {
    width: 190px;
    text-align: right;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9 !important;
}

.cgpa-value {
    color: var(--primary-color);
    font-size: 38px;
    line-height: 1;
}

.student-details td {
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 22px !important;
    padding-bottom: 22px !important;
    width: 25%;
    vertical-align: top;
}

.college-row td {
    padding-top: 16px !important;
    padding-bottom: 26px !important;
}

.info-value {
    color: #000;
    font-size: 15px;
    font-family:"montserrat";
}

.performance-card {
    clear: both;
    width: 100%;
    margin: 0 0 28px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    
}

    .performance-card h2, .detailed-results > h2 {
        margin: 0;
        padding: 16px 24px;
        background: #f5f5f5;
        border-bottom: 1px solid #e2e8f0;
        font-size: 17px;
        color: #1e293b;
        font-weight: normal;
    }

        .detailed-results > h2{
            background:none;
            border:none;
        }

        .performance-content {
            display: flex;
            align-items: stretch;
            padding: 22px;
            gap: 22px;
        }

.total-backlogs {
    min-width: 165px;
    padding-right: 22px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


    .total-backlogs strong {
        color: #ef4444;
        font-size: 50px;
        line-height: 1.1;
    }

.semester-summary {
    flex: 1;
    overflow-x: auto;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 11px;
}

.summary-item {
    min-width: 84px;
    padding: 13px 8px;
    text-align: center;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: #f8fafc;
}

    

    .summary-item strong {
        display: block;
        margin-top: 5px;
        color: #334155;
        font-size: 23px;
        line-height: 1;
    }

        .summary-item strong.has-backlog {
            color: #ef4444;
        }

.summary-table {
    width: 100%;
    table-layout: fixed;
    border: 0 !important;
}

    .summary-table td {
        border: 0 !important;
        text-align: center !important;
        min-width: 65px;
    }

.semester-labels td {
    padding: 10px 7px 2px !important;
    color: #94a3b8;
    font-size: 11px !important;
    font-weight: 700;
    text-transform: uppercase;
}

.backlog-values td {
    padding: 2px 7px 10px !important;
    color: #334155;
    font-size: 23px !important;
    font-weight: 800;
}

    .backlog-values td.has-backlog {
        color: #ef4444;
    }



.semester-card {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    
}

.semester-toggle {
    width: 100%;
    padding: 15px 22px;
    border: 0;
    background: #f5f5f5;
    color: #1e293b;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

    .semester-toggle:hover {
        background: #e5e5e5;
    }

.semester-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: normal;
    text-transform: capitalize;
    font-family: "montserrat";
}

.semester-metrics {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    white-space: nowrap;
}

    .semester-metrics em {
        color: #666;
        font-style: normal;
        font-family: "montserrat-light";
    }

    .semester-metrics strong {
        color: #000;
        font-family:"montserrat";
    }

.semester-result {
    min-width: 54px;
    font-family:"montserrat";
    padding: 7px 11px;
    border-radius: 18px;
    background: #ef4444;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight:bold;
    text-transform: uppercase;
}

.chevron {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform .2s;
}

.semester-toggle.is-collapsed .chevron {
    transform: rotate(-90deg);
}

.result-scroll {
    overflow-x: auto;
}

.result-table {
    width: 100%;
    min-width: 720px;
    border: 0 !important;
    border-collapse: collapse;
}

    .result-table th {
        padding: 11px 20px !important;
        background: no-repeat;
        color: var(--primary-color);
        border: 0 !important;
        text-transform: uppercase;
        border-bottom: #aaa solid thin !important;
        font-weight: normal;
        font-size: 13px !important;
    }

        .result-table th:nth-child(3), .result-table th:nth-child(4) {
            text-align: center;
        }

        .result-table th:last-child {
            text-align: right;
        }

    .result-table td {
        padding: 13px 20px !important;
        border: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 13px !important;
        font-weight:normal;
    }

.subject-code {
    color: #000;
    font-family: "montserrat";
    white-space: nowrap;
}

.subject-name {
    color: #1e293b;
    font-weight: 600;
}

.cell-center {
    text-align: center !important;
}

.passing-year {
    color: #64748b;
    text-align: right !important;
    white-space: nowrap;
}

.grade-pill {
    display: inline-flex;
    justify-content: center;
    min-width: 30px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.grade-high {
    color: #166534;
    background: #dcfce7;
}

.grade-good {
    color: #1e40af;
    background: #dbeafe;
}

.grade-average {
    color: #854d0e;
    background: #fef9c3;
}

.grade-fail {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.result-footer td {
    background: #e5e5e5;
    border-top: 2px solid #e2e8f0 !important;
}

.result-status {
    text-transform: uppercase;
}

@media (max-width: 700px) {
    .student-card td {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .student-name {
        font-size: 21px;
        font-weight:normal;
    }

    .cgpa-cell {
        width: 105px;
    }

    .cgpa-value {
        font-size: 30px;
    }

    .student-details td {
        display: block;
        width: 100%;
    }

    .performance-content {
        flex-direction: column;
    }

    .total-backlogs {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
        padding: 0 0 16px;
        text-align: center;
    }

    .semester-metrics {
        gap: 10px;
    }
}

@media print {
    .student-card, .performance-card, .semester-card {
        box-shadow: none;
        break-inside: avoid;
    }

    .semester-content {
        display: block !important;
    }
}


.semester-toggle .ion-chevron-down {
    transform: rotate(-180deg);
    transition: all 0.4s ease;
}

.semester-toggle.is-collapsed .ion-chevron-down {
    transform: rotate(0);
}
