/* ==============================================================
   NSDVE - Official Examination Result Marksheet Stylesheet
   Designed to match the reference examination statement of marks
   ============================================================== */

.marksheet-wrapper {
    background-color: #f1f5f9;
    padding: 30px 15px;
    min-height: 80vh;
}

.marksheet-container {
    max-width: 950px;
    margin: 0 auto;
    background: #ffffff;
    padding: 35px 40px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid #cbd5e1;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: #111827;
}

/* --------------------------------------------------------------
   MARKSHEET HEADER
   -------------------------------------------------------------- */
.ms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 15px;
}

.ms-logo-col {
    flex: 0 0 110px;
    text-align: center;
}

.ms-logo-col img {
    max-height: 95px;
    width: auto;
    object-fit: contain;
}

.ms-title-col {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.ms-title-hi {
    font-size: 1.18rem;
    font-weight: 700;
    color: #0f2e5a;
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.ms-title-en {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0a1f3d;
    letter-spacing: 0.3px;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.ms-subtitle-1 {
    font-size: 0.76rem;
    color: #1e3a8a;
    font-weight: 600;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.ms-subtitle-2 {
    font-size: 0.74rem;
    color: #334155;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.ms-photo-col {
    flex: 0 0 110px;
    text-align: right;
}

.ms-photo-box {
    width: 95px;
    height: 115px;
    border: 1.5px solid #111827;
    padding: 2px;
    background: #ffffff;
    display: inline-block;
    overflow: hidden;
}

.ms-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Examination Title */
.ms-exam-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f2e5a;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 15px 0 12px 2px;
}

/* --------------------------------------------------------------
   MARKSHEET TABLES
   Blue-bordered crisp examination grid
   -------------------------------------------------------------- */
.ms-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: #000000;
    border: 1.5px solid #0f2e5a;
}

.ms-table th,
.ms-table td {
    border: 1px solid #0f2e5a;
    padding: 7px 10px;
    vertical-align: middle;
}

.ms-table th {
    background-color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f2e5a;
    letter-spacing: 0.2px;
}

/* Enrollment Table Specifics */
.ms-table-enrollment th {
    font-size: 0.82rem;
    width: 33.33%;
    text-align: left;
}

.ms-table-enrollment td {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Student Information Table */
.ms-table-student td {
    font-size: 0.82rem;
}

.ms-table-student .label-cell {
    font-weight: 700;
    color: #0f2e5a;
    width: 18%;
    text-transform: uppercase;
}

.ms-table-student .value-cell {
    font-weight: 600;
    width: 32%;
}

.ms-table-student .duration-label {
    font-weight: 700;
    color: #0f2e5a;
    width: 16%;
    text-transform: uppercase;
    text-align: center;
}

.ms-table-student .duration-val {
    font-weight: 600;
    text-align: center;
    width: 34%;
}

/* Subject Marks Table */
.ms-table-marks th {
    text-align: center;
    font-size: 0.8rem;
    padding: 6px 8px;
}

.ms-table-marks th.subj-head {
    text-align: left;
}

.ms-table-marks td {
    padding: 6px 8px;
    font-size: 0.82rem;
}

.ms-table-marks td.subj-name {
    text-align: left;
    font-weight: 600;
}

.ms-table-marks td.text-center {
    text-align: center;
    font-weight: 500;
}

.ms-table-marks .sub-header-row th {
    font-size: 0.75rem;
    padding: 4px 6px;
}

.ms-table-marks .total-row td {
    font-weight: 700;
    font-size: 0.88rem;
}

/* --------------------------------------------------------------
   MARKSHEET FOOTER & DISCLAIMER
   -------------------------------------------------------------- */
.ms-disclaimer {
    font-size: 0.74rem;
    color: #334155;
    line-height: 1.45;
    margin-top: 18px;
    margin-bottom: 25px;
    font-style: normal;
}

.ms-actions-bar {
    text-align: center;
    padding-top: 10px;
}

.btn-ms-download {
    background-color: #f1f5f9;
    border: 1px solid #94a3b8;
    color: #1e293b;
    padding: 6px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-ms-download:hover {
    background-color: #e2e8f0;
    border-color: #64748b;
    color: #0f172a;
}

.btn-ms-print {
    background-color: #0f2e5a;
    border: 1px solid #0f2e5a;
    color: #ffffff;
    padding: 6px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.15s ease;
}

.btn-ms-print:hover {
    background-color: #0a1f3d;
    color: #ffffff;
}

/* --------------------------------------------------------------
   RESPONSIVE TABLE CONTAINER
   -------------------------------------------------------------- */
.ms-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border: 1.5px solid #0f2e5a;
    background: #ffffff;
}

.ms-table-responsive .ms-table {
    margin-bottom: 0;
    border: none;
    min-width: 600px;
}

.ms-scroll-hint {
    font-size: 0.73rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 500;
}

/* --------------------------------------------------------------
   MOBILE RESPONSIVENESS (@media max-width: 767.98px)
   -------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .marksheet-wrapper {
        padding: 10px 4px;
    }

    .marksheet-container {
        padding: 16px 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        border: 1px solid #e2e8f0;
    }

    .ms-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 16px;
    }

    .ms-logo-col {
        flex: 0 0 70px;
        text-align: left;
    }

    .ms-logo-col img {
        max-height: 62px;
    }

    .ms-photo-col {
        flex: 0 0 70px;
        text-align: right;
    }

    .ms-photo-box {
        width: 68px;
        height: 84px;
    }

    .ms-title-col {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        padding: 6px 0 0 0;
        text-align: center;
    }

    .ms-title-hi {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .ms-title-en {
        font-size: 1.02rem;
        line-height: 1.2;
    }

    .ms-subtitle-1 {
        font-size: 0.68rem;
    }

    .ms-subtitle-2 {
        font-size: 0.65rem;
    }

    .ms-exam-title {
        font-size: 0.88rem;
        text-align: center;
        margin: 10px 0 10px 0;
    }

    .ms-table th,
    .ms-table td {
        padding: 6px 6px;
        font-size: 0.78rem;
    }

    .ms-table-student .label-cell {
        font-size: 0.76rem;
    }

    .ms-table-student .value-cell {
        font-size: 0.78rem;
    }

    .ms-disclaimer {
        font-size: 0.7rem;
        line-height: 1.4;
        margin-top: 14px;
        margin-bottom: 18px;
    }

    .ms-actions-bar {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-top: 5px;
    }

    .btn-ms-download {
        display: block;
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9rem;
        text-align: center;
    }
}

/* --------------------------------------------------------------
   PRINT STYLES (@media print)
   -------------------------------------------------------------- */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .top-info-bar,
    .main-header,
    .navbar-nsdve,
    .site-footer,
    .ms-actions-bar,
    .no-print {
        display: none !important;
    }

    .marksheet-wrapper {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .marksheet-container {
        border: none !important;
        box-shadow: none !important;
        padding: 10px 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .ms-table,
    .ms-table th,
    .ms-table td {
        border-color: #000000 !important;
    }
}

