/* ── Result Manager Frontend ── */
#rm-wrap { font-family: Arial, sans-serif; max-width: 1100px; margin: 0 auto; }

/* Notice */
.rm-notice-warn {
    background: #fff3e0; border: 1px solid #e77716; color: #7a4e12;
    padding: 16px 20px; border-radius: 8px; font-size: 16px; text-align: center;
}

/* Search box */
.rm-search-box {
    background: #fff8f2; border: 1px solid #f5d0a0; border-radius: 12px;
    padding: 24px 28px; margin-bottom: 24px;
}
.rm-search-title { color: #e77716; margin: 0 0 16px; font-size: 20px; }
.rm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; }
.rm-field { display: flex; flex-direction: column; gap: 5px; }
.rm-field label { font-weight: 600; font-size: 13px; color: #222222; }
.rm-field input, .rm-field select {
    padding: 9px 12px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 14px; outline: none; transition: border .2s; height: 50px;
}
.rm-field input:focus, .rm-field select:focus { border-color: #e77716; }
.rm-actions { margin-top: 16px; display: flex; gap: 10px; }
.rm-btn { padding: 10px 24px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.rm-btn:hover { opacity: .85; }
.rm-btn-primary   { background: #e77716; color: #fff; }
.rm-btn-secondary { background: #6c757d; color: #fff; }

/* Status */
.rm-status { padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.rm-status.error { background: #fdecea; border: 1px solid #f5c6cb; color: #721c24; }
.rm-status.info  { background: #fff4e6; border: 1px solid #f5d0a0; color: #e77716; }

/* Count */
.rm-count { font-size: 14px; color: #555; margin-bottom: 8px; }
.rm-count strong { color: #e77716; }

/* Table */
.rm-table-scroll { overflow-x: auto; }
.rm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rm-table thead tr { background: #e77716; }
.rm-table th { color: #fff; padding: 11px 13px; white-space: nowrap; font-weight: 600; }
.rm-table td { padding: 10px 13px; border-bottom: 1px solid #eee; }
.rm-table tbody tr:hover td { background: #fff4e6; cursor: pointer; }

/* Badges */
.rm-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.rm-badge-sub-junior { background: #fff4e6; color: #e77716; }
.rm-badge-junior     { background: #ffe6cc; color: #e77716; }
.rm-badge-senior     { background: #ffe6e6; color: #c62828; }

/* Rank badge */
.rm-rank-badge {
    display: inline-block; background: #e77716;
    color: #fff; font-weight: 700; padding: 3px 14px;
    border-radius: 20px; font-size: 15px;
}

/* Result Card */
#rm_card { margin-top: 28px; }
.rm-result-card {
    border: 2px solid #e77716; border-radius: 12px; overflow: hidden;
    max-width: 680px; margin: 0 auto; box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.rm-card-header {
    background: #e77716; color: #fff; padding: 16px 22px;
    text-align: center; font-size: 18px; font-weight: 700;
}
.rm-card-table { width: 100%; border-collapse: collapse; }
.rm-card-table td { padding: 10px 16px; border-bottom: 1px solid #eee; font-size: 14px; }
.rm-card-table tr:last-child td { border-bottom: none; }
.rm-card-table td:first-child { font-weight: 700; background: #fff4e6; color: #e77716; width: 45%; }

/* Card footer — Download + Close buttons */
.rm-card-footer {
    background: #fff8f2; border-top: 1px solid #f5d0a0;
    padding: 14px 18px; display: flex; gap: 10px;
    justify-content: center; flex-wrap: wrap;
}
.rm-btn-download {
    background: #e77716; color: #fff; border: none;
    padding: 11px 28px; border-radius: 8px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background .2s, transform .15s;
}
.rm-btn-download:hover { background: #c5620e; transform: translateY(-1px); }
.rm-close-card {
    background: #fff; color: #888; border: 1px solid #ddd;
    padding: 11px 20px; border-radius: 8px;
    font-size: 14px; cursor: pointer;
}
.rm-close-card:hover { background: #f5f5f5; }

/* Print styles */
@media print {
    body * { visibility: hidden !important; }
    #rm_print_area, #rm_print_area * { visibility: visible !important; }
    #rm_print_area { position: fixed; top: 0; left: 0; width: 100%; }
    .rm-card-footer { display: none !important; }
}@media (max-width: 992px) {.rm-btn {padding: 10px 20px;}}/* School dropdown height limit */
/* ✅ FIX Select2 height (override default 28px) */
.select2-container .select2-selection--single {
    height: 50px !important;
    border-radius: 6px !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
color:#000!important;}
/* Text vertically center */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 50px !important;
	color:#000!important;
}

/* Arrow alignment fix */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px !important;
}

/* 🔥 Dropdown scroll (main fix) */
.select2-results__options {
    max-height: 220px !important;
    overflow-y: auto !important;
}

/* Theme match */
.select2-container--default .select2-results__option--highlighted {
    background: #fff4e6 !important;
    color: #e77716 !important;
}