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

@page {
    size: A4;
    margin: 0.5cm;
}

body {
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    color: #333333;
    line-height: 1.5;
}

/* --- Main Container --- */
.container_marksheet_template {
    page-break-after:always;
    width: auto;
    height: auto;
    border: 2px solid #333333;
    /* Dark Grey */
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    margin: 10px;
    /*padding:20px;*/
}

.content_container {
    padding: 15px 2%;
}

/* --- Header Section --- */
.header_template {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333333;
    /* Dark Grey */
}

.logo_div img {
    width: 70px;
    height: auto;
    margin-right: 20px;
}

.header_institution {
    text-align: center;
}

.heading_template {
    font-size: 20pt;
    font-weight: 700;
    color: #333333;
    /* Dark Grey */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.heading_code_info,
.heading_address,
.contact_info {
    font-size: 10pt;
    color: #555555;
}

.report_header {
    text-align: center;
    margin: 10px 0;
}

.heading_report {
    font-size: 14pt;
    font-weight: 700;
    color: #333333;
    /* Dark Grey */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.academic_session {
    font-size: 14px;
    color: #555555;
}

/* --- Student Info --- */
.student_info_container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    padding: 10px;
    background: #f5f5dc;
    /* Beige */
    border-radius: 8px;
}

.student_info_item {
    font-size: 14px;
}

.student_info_item label {
    font-weight: 600;
    color: #333333;
    /* Dark Grey */
    margin-right: 5px;
}

/* --- Form and Table --- */
.form-container {
    margin: 15px 0;
}

.stream-selector {
    margin-bottom: 15px;
    text-align: center;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    cursor: pointer;
}

.subjects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    page-break-inside: avoid;
}

.subjects-table thead th {
    background: #333333 !important;
 
    color: #f5f5dc;
 
    padding: 8px;
    text-transform: uppercase;
    font-weight: 600;
    border: 1px solid #ccc;
}

.subjects-table tbody td {
    padding: 6px;
    border: 1px solid #ccc;
    text-align: center;
    background: #f5f5dc;
    /* Beige for cells */
}

.subjects-table tbody tr:nth-child(even) {
    background-color: #faf5e6;
    /* Slightly lighter beige */
}

.subjects-table .subject-name-input,
.subjects-table .marks-obtained {
    width: 90%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.subjects-table .subject-type-select {
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

.btn-primary {
    background-color: #333333;
    /* Dark Grey */
    color: #f5f5dc;
    /* Beige text */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #555555;
}

/* --- Summary container inline items --- */
.summary-container {
    background: #f5f5dc;
    /* Beige */
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #ccc;
    flex-wrap: wrap;
}

.summary-item-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    flex: 1;
    min-width: 180px;
    /* Prevents too small input in small screens */
}

.form-control-inline {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 120px;
}

/* --- Signature container in one row --- */
.signature_container {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.signature_div {
    text-align: center;
    width: 32%;
}

.signature-line {
    border-top: 1px solid #333333;
    /* Dark Grey */
    margin-bottom: 5px;
}

.signature_div span {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}


.disclaimer {
    font-size: 13px;
    color: #ff0a0a;
    margin-top: 20px;
    text-align: center;
}

.date {
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    margin-top: 10px;
    text-align: left;
}
.btn-upload {
    background-color: #f5f5dc;
    color: black;
    padding: 10px 20px;
    border: 1px solid #999999;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    
}
.stream_info {
        margin: 20px 10px;          
        font-size: 16px;
        font-weight: 500;
        text-align: center;         
        display: block;              
    }

    .stream_info span {
        background-color: #f5f5dc;  
        border: 1px solid #dcd6b1;  
        padding: 10px 20px;
        border-radius: 5px;
        font-weight: 700;
        margin-right: 5px;
        color: #333;
    }

/*.btn-upload:hover {*/
/*    background-color: #f5f5dc;*/
/*}*/
/* --- Print --- */
@media print {
    @page{
           size: A4;
    }
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .container_marksheet_template {
        page-break-after:always;
         margin: 50px 0 !important;
    }
     
}