/* === BASE (from actual resultstyle.css) ================================= */
body { font-family: Arial, Helvetica, sans-serif; }
body,html { padding:0; margin:0; }

table { margin:auto; border:1px solid #ccc; background-color:#fff; margin:1em 0; border-collapse:collapse; }
table tr:nth-child(even) { background:rgba(23,23,23,0.1); }
table tr:hover, table tr:active { background:rgba(2,2,2,0.2); }
table td { padding:4px; border:1px solid #555; padding:5px; }
input[type="text"], input[type="password"], textarea { min-width:200px; padding:3px; }
input[type="submit"] { min-width:100px; padding:3px; }
a { text-decoration:none; }
img { border:none; }
hr { border:none; border-bottom:1px solid #888; width:90%; align-self:center; }
ol { list-style:none; }

/* === SIDEBAR LIST ITEMS (exact from real CSS) ============================ */
.aLst1 { color:#305; padding:4px; font-weight:bold; font-size:small; }
.aLst1 sup {
    background:#bec;
    color:#973;
    margin:auto;
    margin-right:10%;
    max-width:60%;
    display:block;
    font-size:x-small;
}
.aLst1:hover { background:#ffd; color:#355; }

/* === SIDEBAR & MAIN CONTENT DIVS (exact from real CSS) ================== */
#divLinksListMn1, #divMainContent {
    float:left;
    border:1px solid #aaa;
    max-width:90%;
    margin-left:2px;
}

#divLinksListMn1 { background:#feb; width:280px; max-width:280px; }
#divLinksListMn1 ul { background:#feb; padding:none; padding-left:30px; margin:0px; }
#divLinksListMn1 li {
    margin-left:8px;
    text-align:left;
    width:90%;
    background:#fea;
    border-bottom:1px solid #8aa;
    border-bottom:1px dashed #8aa;
}
#divLinksListMn1 li:hover { background:#ffd; color:#f55; }

/* Right content area — teal green */
#divMainContent {
    width:calc(100% - 284px);
    min-width:300px;
    background:rgb(74, 185, 170);
    padding:10px;
}

/* === SCROLLABLE LIST (exact from real CSS) =============================== */
#ulresultslist1 { max-height:800px; overflow-y:auto; }

/* === TABLE OVERRIDES for wider/special tables ============================ */
table.c4, .ctN9 { width:100%; text-align:left; background:none; border:none; }
.c4 td, .ctN9 td { border:none; background:none !important; }
.c4 tr,.c4 tr:hover,.c4 tr:active,.c4 tr:focus,
.ctN9 tr:hover,.ctN9 tr:active,.ctN9 tr:focus { background:none !important; }

/* === TOOLTIP (exact from real CSS) ====================================== */
.tooltip { position:relative; display:inline-block; border-bottom:1px dotted black; }
.tooltip .tooltiptext {
    visibility:hidden;
    width:300px;
    background-color:#f9f9f9;
    color:#666;
    text-align:center;
    border-radius:4px;
    padding:5px 0;
    font-size:smaller;
    border:1px dashed #eee;
    position:absolute;
    z-index:1;
    top:-5px;
    left:105%;
}
.tooltip .tooltiptext::after {
    content:" ";
    position:absolute;
    top:15px;
    right:100%;
    margin-top:-5px;
    border-width:10px;
    border-style:solid;
    border-color:transparent #888 transparent transparent;
}
.inp:focus+.tooltiptext, .tooltip:hover .tooltiptext { visibility:visible; }

/* === JQUERY UI AUTOCOMPLETE (exact from real CSS) ======================== */
.ui-autocomplete li, .ui-widget { list-style:none; padding:3px 3px !important; font-size:small; }
.ui-menu .ui-menu { position:absolute; }
.ui-menu-item {
    position:relative; margin:0; cursor:pointer; min-height:0;
    list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited { color:#1c94c4; text-decoration:none; }
.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,
.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus {
    background:#3d9182;
    font-weight:normal;
    color:#193840;
    background:linear-gradient(#598,#376,#598);
    color:#FFFEC6;
}
.ui-autocomplete.ui-widget { width:500px !important; }
.ui-autocomplete { text-align:left; max-height:500px; overflow-y:auto; background:#eee; }
.ui-autocomplete sup { position:absolute; right:0; }
.ui-autocomplete .ui-state-active {
    border:1px solid #416161; background:#416161; font-weight:normal; color:#ffffff;
}

/* === insTable — exact from real CSS ====================================== */
.insTable td { background:none !important; border:none; }

/* === DMC / Result card classes (exact from real resultstyle.css) ========= */
#mainPrint {
    margin:0 auto;
    padding:0.4in 0.5in;
    border:double;
    width:8.27in !important;
    min-height:4in;
    text-align:left;
    background:#fff;
    font-family:Arial,Helvetica,sans-serif;
}
h1.c1 { font-size:20pt; margin:0; font-weight:bold; }
h2.c2 { font-size:10pt; margin:0; font-weight:normal; }
div.c5 { text-align:center; }
div.c6 { font-size:14pt; font-weight:bold; padding-bottom:4px; text-align:center; text-decoration:underline; }
table.c4 { width:100%; text-align:left; border:none; background:none; margin:0; }
table.c4 td { border:none; background:none !important; }
table.c4 tr, table.c4 tr:hover, table.c4 tr:active { background:none !important; }
table.c8 { border:1px solid #000; min-width:5in; width:92%; text-align:left; vertical-align:middle; border-collapse:collapse; margin:10px auto; }
table.c8 td { border:1px solid #000; padding:7px 10px; }
table.c8 tr:nth-child(even) { background:none; }
table.c8 tr:hover, table.c8 tr:active { background:rgba(2,2,2,0.05); }
td.c3, p.c9 { font-weight:bold; }
.enf { font-family:'Times New Roman',serif; font-size:12pt; }
.pj { text-align:justify; white-space:normal; word-break:break-word; font-size:8pt; margin-top:14px; }

/* === Right area structure ================================================ */
#divMainContent h3 { text-align:center; margin:6px 0; font-size:1em; }
#divMainContent > div { overflow:hidden; }
#divMainContent > div > a { font-size:x-small; float:left; color:#1a0dab; margin-right:5px; }
#divMainContent form { display:inline; }
#inRoll { text-transform:uppercase; }

/* Top control row */
#topControlRow {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    padding:2px 4px;
    min-height:26px;
}
#topControlRow marquee { flex:1; font-size:.88em; color:#333; }
#btnCompleteNotice, #btnPrint {
    padding:2px 8px; background:#f0f0f0; color:#000;
    border:1px solid #aaa; cursor:pointer; border-radius:2px;
    font-size:.82em; margin-left:4px; white-space:nowrap;
}
#btnCompleteNotice:hover, #btnPrint:hover { background:#ddd; }
#divNoticeText { padding:6px 10px; font-size:.85em; background:#fffde7; text-align:left; }

/* Result table */
.result-container { margin:6px auto; max-width:820px; text-align:left; }
.result-header { background:#003399; color:#fff; text-align:center; padding:7px; font-size:.95em; font-weight:bold; }
.student-info { background:#e8f0fa; padding:7px 12px; border:1px solid #c0d4ec; border-top:none; font-size:.84em; display:grid; grid-template-columns:1fr 1fr; gap:4px 20px; }
.info-row { display:flex; gap:5px; align-items:baseline; }
.info-row .label { font-weight:bold; color:#333; min-width:130px; flex-shrink:0; }
.marks-table { width:100%; border-collapse:collapse; margin-top:8px; font-size:.82em; }
.marks-table th { background:#003399; color:#fff; padding:5px 7px; text-align:center; border:1px solid #1a3a99; white-space:nowrap; }
.marks-table td { border:1px solid #bbb; padding:4px 6px; text-align:center; }
.marks-table tr:nth-child(even) td { background:#eef4ff; }
.marks-table .total-row td { background:#d4e8f8 !important; font-weight:bold; }
.result-status { text-align:center; padding:8px; font-size:1.05em; font-weight:bold; border:1px solid #ccc; margin-top:4px; }
.result-status.pass     { background:#d4edda; color:#155724; border-color:#c3e6cb; }
.result-status.fail     { background:#f8d7da; color:#721c24; border-color:#f5c6cb; }
.result-status.reappear { background:#fff3cd; color:#856404; border-color:#ffeeba; }

/* Print — show ONLY #mainPrint, hide everything else */
@media print {
    body * { visibility: hidden !important; }
    #mainPrint, #mainPrint * { visibility: visible !important; }
    #mainPrint {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #fff !important;
        padding: 0.5in !important;
        box-shadow: none !important;
        border: none !important;
    }
    #mainPrint table { border-collapse: collapse !important; }
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
