.jmi-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jmi-popup {
    background: #fff;
    padding: 18px 22px 16px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

.jmi-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}
.jmi-close:hover {
    color: #ff0000;
}

.jmi-popup h2 {
    margin-top: 0;
    color: #00695c;
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.jmi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

@media (max-width: 480px) {
    .jmi-grid {
        grid-template-columns: 1fr;
    }
}

.jmi-field {
    margin-bottom: 0;
}

.jmi-field label {
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
    font-size: 0.8rem;
}

.jmi-field input,
.jmi-field select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.jmi-field input:focus,
.jmi-field select:focus {
    outline: none;
    border-color: #00695c;
    box-shadow: 0 0 0 2px rgba(0,105,92,0.15);
}

/* CHANGE 3: Inline hint text below Application No. and Roll No. */
.jmi-field-hint {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-top: 1px;
    transition: color 0.2s;
}

.jmi-field-hint.hint-ok {
    color: #2e7d32;
    font-weight: 600;
}

.jmi-field-hint.hint-error {
    color: #c62828;
    font-weight: 600;
}

/* Highlight input border on live validation */
#jmi-application-no:valid,
#jmi-roll-no:valid {
    border-color: #2e7d32 !important;
}

#jmi-application-no:invalid:not(:placeholder-shown),
#jmi-roll-no:invalid:not(:placeholder-shown) {
    border-color: #c62828 !important;
}

.jmi-submit {
    width: 100%;
    padding: 10px;
    background: #00695c;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    margin-top: 10px;
}

.jmi-submit:hover {
    background: #004d40;
}

.jmi-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.jmi-open-btn {
    padding: 15px 30px;
    background: #00695c;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 105, 92, 0.4);
}

#jmi-result {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
}

/* ── Qualified result ─────────────────────────────────────────────────────── */
.qualified-msg {
    color: #2e7d32;
    background: #e8f5e9;
    border: 2px solid #66bb6a;
    padding: 24px 20px;
    border-radius: 12px;
    animation: jmi-pop-in 0.4s ease;
}

.qualified-msg h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* CHANGE 4: Celebration emoji row */
.jmi-celebration-icons {
    font-size: 2rem;
    letter-spacing: 6px;
    margin-bottom: 10px;
    animation: jmi-bounce 0.6s infinite alternate;
}

@keyframes jmi-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-6px); }
}

/* ── Not-qualified result ─────────────────────────────────────────────────── */
.not-qualified-msg {
    color: #c62828;
    background: #ffebee;
    border: 2px solid #ef9a9a;
    padding: 24px 20px;
    border-radius: 12px;
    animation: jmi-pop-in 0.4s ease;
}

.jmi-sorry-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

/* ── CHANGE 2: Note shown in the result popup ─────────────────────────────── */
.jmi-result-note {
    font-size: 0.78rem;
    color: #666;
    font-style: italic;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    line-height: 1.5;
}

/* ── Form disclaimer (above submit button) ────────────────────────────────── */
.jmi-disclaimer {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    text-align: center;
}

/* ── Pop-in animation for results ────────────────────────────────────────── */
@keyframes jmi-pop-in {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}
