* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #ffffff;
    color: #333333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif; 
}
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    flex: 1 0 auto; 
}
/* --- Header Styles --- */
.main-header {
    background-color: #cc1e1e; /* Solid red background */
    border-top: 20px solid #000000; /* Dark top border border */
    padding: 15px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Logo Setup */
.logo-oval {
    text-align: center;
}

.logo-oval img{
    max-width: 350px;
}



/* Certifications Banner Simulation */
.banner-area {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    gap: 15px;
    font-weight: bold;
    font-size: 14px;
}

.banner-item {
    display: flex;
    align-items: center;
    height: 100%;
}

.text-blue { color: #0056b3; font-size: 18px; font-weight: 900; }
.text-red { color: #cc1e1e; font-size: 18px; font-weight: 900; }
.italic { font-style: italic; }

.bg-red {
    background-color: #cc1e1e;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
}

.small-text {
    flex-direction: column;
    font-size: 8px;
    line-height: 1.1;
    align-items: flex-start;
    color: #333;
}
.small-text strong { font-size: 11px; }

.psc-box {
    border-left: 1px solid #ccc;
    padding-left: 10px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.psc-badge {
    background-color: #cc1e1e;
    color: #ffffff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
}

.psc-text {
    font-size: 10px;
    color: #333;
    max-width: 70px;
    line-height: 1.2;
}

.whatsapp-icon {
    font-size: 20px;
    color: #25D366;
    cursor: pointer;
}

/* --- Main content Layout --- */
.content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* Results Card container */
.results-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.card-header {
    background-color: #666666;
    color: #ffffff;
    text-align: center;
    padding: 12px;
    font-size: 24px;
    font-weight: 500;
}

.card-body {
    padding: 30px 40px;
    text-align: center;
}

.instruction-text {
    color: #333333;
    font-size: 14px;
    margin-bottom: 25px;
}

/* Form Styles */
.results-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.form-group label {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    white-space: nowrap;
}

.form-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cccccc;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #666666;
}

.submit-btn {
    background-color: #d9534f;
    color: #ffffff;
    border: none;
    padding: 8px 24px;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #c9302c;
}

/* --- Footer Styles --- */
.main-footer {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 15px;
    font-size: 12px;
}

.designer-link {
    color: #3498db;
    text-decoration: none;
}


/* --- Header & Layout Component Panels --- */
.results-header h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 25px;
}

.subheader-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.reg-number-title {
    font-size: 16px;
    color: #000;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 6px 18px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}
.btn-print { background-color: #dc143c; }
.btn-back { background-color: #4682b4; }

/* --- Side-by-side Layout Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.panel {
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.panel-header {
    padding: 12px 15px;
    font-size: 18px;
    font-weight: bold;
}

.bg-green { background-color: #d0e8d0; color: #407040; }
.bg-blue { background-color: #d6ecf8; color: #2a6496; }

.panel-body {
    padding: 25px;
}

/* --- Marks Data Table Layouts --- */
.marks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.marks-table th, .marks-table td {
    border: 1px solid #a0a0a0;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

.marks-table th {
    font-weight: bold;
    background-color: #ffffff;
}

.merged-total {
    vertical-align: middle;
    font-weight: 500;
}

.results-summary-footer {
    display: flex;
    gap: 30px;
    font-size: 15px;
    padding-top: 10px;
}

/* --- Student Sidebar Box Layouts --- */
.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table td {
    border: 1px solid #808080;
    padding: 12px 10px;
    font-size: 13px;
}

.label-col {
    color: #cd5c5c;
    font-weight: bold;
    width: 45%;
}

/* --- Footer component element --- */
.bottom-footer {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    width: 100%;
}
.bottom-footer .brand { color: #3498db; }


/* Screen hide engine */
.print-only {
    display: none;
}


/* --- PIXEL PERFECT PRINT MANAGEMENT --- */
@media print {

    @page {
        size: A4;
        margin: 10mm;
    }

    body * {
        visibility: hidden;
    }

    #print-marksheet-document,
    #print-marksheet-document * {
        visibility: visible;
    }

    body {
        margin: 0;
        padding: 0;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #print-marksheet-document {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block !important;
        font-family: "Times New Roman", serif;
    }

    .print-border-box {
        width: 190mm;
        min-height: 265mm;
        margin: auto;
        padding: 20mm 15mm;
        border: 2px solid #444;
        border-radius: 18px;
        background: #fff;
        position: relative;
    }

    .print-title {
        text-align: center;
        font-size: 22px;
        font-weight: bold;
        margin-bottom: 20px;
        letter-spacing: 0;
    }

    /* Candidate Info */

    .print-info-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 0;
    }

    .print-info-table td {
        border: 1px solid #000;
        padding: 8px 10px;
        font-size: 13px;
        text-transform: uppercase;
    }

    .print-info-table.sub-info {
        margin-top: -1px;
        margin-bottom: 15px;
    }

    .print-info-table.sub-info td {
        border-top: none;
    }

    /* Marks Table */

    .print-data-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
    }

    .print-data-table th,
    .print-data-table td {
        border: 1px solid #000;
        padding: 4px 6px;
        font-size: 13px;
    }

    .print-data-table th {
        text-align: center;
        font-weight: bold;
    }

    .subject-name-cell {
        text-align: center;
        text-transform: uppercase;
    }

    .merged-cell {
        text-align: center;
        vertical-align: middle;
    }

    .footer-totals-row td {
        font-weight: bold;
        text-align: center;
    }

    /* Grade Table */

    .print-grading-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 18px;
    }

    .print-grading-table th,
    .print-grading-table td {
        border: 1px solid #000;
        padding: 4px 8px;
        font-size: 13px;
    }

    .print-grading-table th {
        font-weight: bold;
        text-align: center;
    }

    .grading-subhdr td {
        font-weight: bold;
        text-align: center;
    }

    /* Footer */

    .print-footer-container {
        margin-top: 15px;
        position: relative;
        min-height: 100px;
    }

    .notice-text {
        font-size: 13px;
        font-weight: bold;
        margin-top: 20px;
    }

    /* Seal */

    .seal-placeholder {
        position: absolute;
        right: 10px;
        bottom: 0;
        width: 75px;
        height: 75px;
        border: 2px solid #4da3ff;
        border-radius: 50%;
        opacity: .7;
    }

    .bold-text {
        font-weight: bold;
    }

    .seal-placeholder{
        position:absolute;
        right:10px;
        bottom:0;
        border:none;
    }
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .form-group input {
        width: 100%;
    }

    .dashboard-grid { grid-template-columns: 1fr; }
    .subheader-row { flex-direction: column; gap: 15px; align-items: flex-start;}
}