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

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

body {
    font-family: "Calibri", "Segoe UI", Arial, sans-serif;
    color: #333;
    background: #f0f8f0; /* light green-ish background */
    line-height: 1.5;
}

/* --- Main Container --- */
.container_marksheet_template {
    page-break-after:always;
    width: auto;
    height: auto;
    border: 2px solid #0b722d; /* green border */
    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 #0b722d; /* green */
}

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

.header_institution {
    text-align: center;
}

.heading_template {
    font-size: 20pt;
    font-weight: 700;
    color: #0b722d; /* green */
    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: #0b722d; /* green */
    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 #0b722d; /* green */
    padding: 10px;
    background: #e6f4ea; /* light green */
    border-radius: 8px;
}

.student_info_item {
    font-size: 14px;
}

.student_info_item label {
    font-weight: 600;
    color: #0b722d; /* green */
    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 #0b722d; /* green */
    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: #0b722d !important; /* green */
    color: #fff !important;
    border: 1px solid #0b722d !important;
}

.subjects-table tbody td {
    background: #e6f4ea !important; /* light green */
    border: 1px solid #0b722d !important;
    padding:10px;
}

.subjects-table tbody tr:nth-child(even) td {
    background-color: #d8f0d8 !important; /* lighter green */
}
.subjects-table .subject-name-input,
.subjects-table .marks-obtained {
    width: 90%;
    padding: 4px;
    border: 1px solid #0b722d;
    border-radius: 3px;
}

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

.btn-primary {
    background-color: #0b722d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

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

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

.summary-item-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    flex: 1;
    min-width: 180px;
}

.form-control-inline {
    padding: 6px 10px;
    border: 1px solid #0b722d;
    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 #0b722d; /* green */
    margin-bottom: 5px;
}

.signature_div span {
    font-size: 14px;
    font-weight: 600;
    color: #0b722d; /* green */
}

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

.date {
    font-size: 15px;
    font-weight: 600;
    color: #0b722d; /* green */
    margin-top: 10px;
    text-align: left;
}

.btn-upload {
    background-color: #0b722d;
    color: white;
    padding: 10px 20px;
    border: 1px solid #0b722d;
    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: #e6f4ea;  
    border: 1px solid #0b722d;  
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    margin-right: 5px;
    color: #0b722d;
}

/* --- Print --- */
/* --- Print-friendly black & white --- */
@media print {
    body {
        color: #000 !important;
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Remove logo and header visuals */
    .logo_div,
    .heading_template {
        display: none !important;
    }

    /* Headings and text in black */
    .heading_code_info,
    .heading_address,
    .contact_info,
    .report_header,
    .heading_report,
    .academic_session,
    .student_info_container,
    .summary-container,
    .signature_container,
    .stream_info,
    .date,
    .disclaimer,
    .btn-upload,
    .btn-primary,
    .form-control,
    .form-control-inline {
        color: #000 !important;
        background: #fff !important;
        border-color: #000 !important;
    }

    /* Table in black & white, no background colors */
    .subjects-table {
        color: #000 !important;
        border: 1px solid #000 !important;
        background: #fff !important;
    }

    .subjects-table thead th,
    .subjects-table tbody td,
    .subjects-table tbody tr:nth-child(even) td {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }

    /* Remove shadows and box effects */
    .container_marksheet_template,
    .student_info_container,
    .summary-container,
    .signature_container,
    .stream_info {
        box-shadow: none !important;
    }
    .student_info_item label{
        color:black;
    }
    .header_template{
        border-bottom:1px solid black;
    }
    .container_marksheet_template{
        border:1px solid black;
    }
    
   .stream_info span {
    background-color:transparent !important;  
    border: 1px solid black;  
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    margin-right: 5px;
    color: black;
}
.signature_div span{
    color:black;
}
.signature-line{
    border-top: 1px solid black;
}
    /* Buttons hidden in print */
    .btn-upload,
    .btn-primary {
        display: none !important;
    }
}

