/* ═══════════════════════════════════════════════════════
   NU Latest Result Plugin — Clean Default Style v3.0
   ═══════════════════════════════════════════════════════ */

#nu-result-wrapper {
    max-width: 560px;
    margin: 30px auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

/* ── FORM HEADER ── */
.nu-form-header {
    background: linear-gradient(135deg, #005f8a 0%, #0099cc 100%);
    border-radius: 8px 8px 0 0;
    padding: 20px 24px;
}
.nu-title {
    color: #fff;
    font-size: 20px;
    margin: 0 0 2px 0;
    font-weight: bold;
}
.nu-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    margin: 0;
    font-style: italic;
    border-left: 3px solid rgba(255,255,255,0.5);
    padding-left: 8px;
}

/* ── FORM BODY ── */
#nu-result-form-area {
    background: #fff;
    border: 1px solid #dde3ea;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 22px 24px 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.nu-field { margin-bottom: 14px; }
.nu-field label {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-size: 13px;
}

#nu_exm_code,
.nu-field input[type="text"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #c8d0d8;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fafbfc;
    color: #333;
    transition: border-color .2s, box-shadow .2s;
}
#nu_exm_code:focus,
.nu-field input[type="text"]:focus {
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0,153,204,0.12);
    outline: none;
    background: #fff;
}

/* ── BUTTONS ── */
#nu-search-btn, #nu-archive-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 6px;
    background: #27ae60;
    color: #fff;
    display: block;
    transition: background .2s;
}
#nu-search-btn:hover, #nu-archive-btn:hover { background: #219a52; }
#nu-archive-btn { margin-top: 8px; }

/* ── ERROR ── */
#nu-error-msg {
    background: #fff3f3;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    display: none;
}

/* ── LOADING ── */
#nu-loading { text-align: center; padding: 40px 0; color: #0073a6; display: none; }
.nu-spinner {
    border: 4px solid #e0eef5;
    border-top: 4px solid #0099cc;
    border-radius: 50%;
    width: 42px; height: 42px;
    animation: nu-spin .8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes nu-spin { to { transform: rotate(360deg); } }

/* ── BACK BUTTON ── */
#nu-result-output { width: 100%; }
#nu-back-btn {
    background: #5d6d7e;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 9px 18px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 16px;
    transition: background .2s;
}
#nu-back-btn:hover { background: #4a5568; }

/* ════════════════════════════════════════════════════════
   RESULT — Clean default, no bg on headings
   ════════════════════════════════════════════════════════ */

#nu-result-content { width: 100%; }

.nu-result-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Title block — plain text, no background */
.nu-result-title {
    padding: 20px 0 10px;
    text-align: center;
}
.nu-result-exam-name {
    font-size: 17px;
    font-weight: bold;
    color: #222;
    margin-bottom: 4px;
}
.nu-result-sheet-label {
    font-size: 15px;
    color: #333;
    font-weight: bold;
}

/* Table card wrapper */
.nu-table-card {
    padding: 0;
    width: 100%;
}
.nu-table-card + .nu-table-card {
    border-top: 8px solid #f0f4f8;
}

/* Tables — default NU style */
#nu-result-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* All cells */
#nu-result-content table td,
#nu-result-content table th {
    padding: 8px 12px !important;
    border: 1px solid #ccc !important;
    vertical-align: middle !important;
    color: #222 !important;
    background: #fff !important;
    text-align: left !important;
}

/* Header row — plain bold, light gray bg like NU default */
#nu-result-content table tr:first-child td,
#nu-result-content table tr:first-child th {
    background: #f2f2f2 !important;
    font-weight: bold !important;
    text-align: center !important;
    color: #111 !important;
    border-color: #ccc !important;
}

/* Zebra */
#nu-result-content table tr:nth-child(even) td {
    background: #f9f9f9 !important;
}
#nu-result-content table tr:nth-child(odd):not(:first-child) td {
    background: #fff !important;
}

/* Center-aligned cells */
#nu-result-content table td[align="center"] {
    text-align: center !important;
}

/* Error text */
#nu-result-content font[color="#FF0000"] {
    color: #cc0000 !important;
    font-weight: bold !important;
    display: block;
    text-align: center;
    padding: 16px;
}

/* Strip stray spacing from NU's p/br inside result */
#nu-result-content .nu-result-card p,
#nu-result-content .nu-result-card center,
#nu-result-content .nu-result-card br {
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    #nu-result-wrapper { max-width: 100%; }
    #nu-result-form-area { padding: 16px; }
    .nu-title { font-size: 17px; }
    #nu-result-content table td,
    #nu-result-content table th { padding: 6px 8px !important; font-size: 12px !important; }
}
