/* ============================================================================
 * Result Publish by suwalsoft — Modern Frosted Glass Stylesheet
 * Scoped with high specificity so WordPress themes & wp-admin styles never break layout.
 * ============================================================================ */

.sr-rp-admin,
.sr-rp-portal-stage {
  --sr-font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sr-font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sr-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--sr-font-sans);
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sr-rp-admin *,
.sr-rp-portal-stage * {
  box-sizing: border-box;
}

/* Glacial-Mist Ambient Canvas */
.sr-rp-admin .sr-rp-shell,
.sr-rp-portal-stage {
  background-color: #edf2f9;
  background-image:
    radial-gradient(at 8% 6%, rgba(59, 130, 246, 0.16) 0px, transparent 48%),
    radial-gradient(at 92% 10%, rgba(14, 165, 233, 0.14) 0px, transparent 46%),
    radial-gradient(at 78% 88%, rgba(99, 102, 241, 0.11) 0px, transparent 50%),
    radial-gradient(at 18% 84%, rgba(56, 189, 248, 0.11) 0px, transparent 46%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.sr-rp-admin-screen #wpbody-content {
  padding-bottom: 32px;
}

body.sr-rp-admin-screen .wrap.sr-rp-admin {
  margin: 16px 20px 24px 0 !important;
  max-width: none !important;
}

.sr-rp-admin .sr-rp-shell {
  overflow: hidden;
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
}

.sr-rp-portal-stage {
  padding: 20px !important;
  margin: 24px auto !important;
  max-width: 980px !important;
  width: 100%;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
}

.sr-rp-portal-stage button,
.sr-rp-admin button {
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none;
}

/* Frosted Glass Panel */
.sr-rp-glass-panel {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -16px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  border-radius: 16px;
}

/* Admin Topbar */
.sr-rp-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.sr-rp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sr-rp-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #2563eb;
  color: #ffffff;
  font-family: var(--sr-font-display);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.55);
}

.sr-rp-brand-title {
  font-family: var(--sr-font-display);
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.sr-rp-nav-track,
.sr-rp-glass-track {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.sr-rp-nav-link,
.sr-rp-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #475569 !important;
  text-decoration: none !important;
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.sr-rp-nav-link:hover,
.sr-rp-tab:hover {
  color: #0f172a !important;
}

.sr-rp-nav-link.is-active,
.sr-rp-tab.is-active {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Content Shell */
.sr-rp-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
}

.sr-rp-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.sr-rp-h1 {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--sr-font-display) !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
}

.sr-rp-h2 {
  margin: 0 0 4px !important;
  padding: 0 !important;
  font-family: var(--sr-font-display) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.sr-rp-lead {
  margin: 4px 0 0 !important;
  font-size: 13.5px;
  color: #475569;
}

.sr-rp-sub {
  margin: 0 !important;
  font-size: 12px;
  color: #64748b;
}

/* KPI Strip */
.sr-rp-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.sr-rp-kpi {
  padding: 18px 20px;
  border-right: 1px solid rgba(226, 232, 240, 0.7);
}

.sr-rp-kpi:last-child {
  border-right: 0;
}

.sr-rp-kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.sr-rp-kpi-val {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.15;
}

.sr-rp-kpi-code {
  margin-top: 10px;
}

.sr-rp-kpi-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

/* Forms & Inputs (Protected against WP Admin & Theme overrides) */
.sr-rp-form-panel {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sr-rp-form-grid {
  display: grid;
  gap: 14px;
}

.sr-rp-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sr-rp-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sr-rp-form-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sr-rp-col-2 { grid-column: span 2; }

.sr-rp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sr-rp-field label,
.sr-rp-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
}

.sr-rp-admin input[type="text"],
.sr-rp-admin input[type="number"],
.sr-rp-admin input[type="search"],
.sr-rp-admin select,
.sr-rp-portal-stage input[type="text"],
.sr-rp-portal-stage input[type="search"],
.sr-rp-portal-stage select {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 38px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  font-family: var(--sr-font-sans) !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sr-rp-admin input:focus,
.sr-rp-admin select:focus,
.sr-rp-portal-stage input:focus,
.sr-rp-portal-stage select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Buttons */
.sr-rp-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px !important;
  border-radius: 9px !important;
  font-family: var(--sr-font-sans) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background-color 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

.sr-rp-btn--sm {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

.sr-rp-btn--full {
  width: 100%;
}

.sr-rp-btn--primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.55);
}

.sr-rp-btn--primary:hover {
  background: #1d4ed8 !important;
}

.sr-rp-btn--secondary {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

.sr-rp-btn--secondary:hover {
  background: #ffffff !important;
  color: #0f172a !important;
}

.sr-rp-form-actions,
.sr-rp-form-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-top: 6px;
}

/* Dashboard Grid */
.sr-rp-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* Tables */
.sr-rp-table-panel {
  overflow: hidden;
}

.sr-rp-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.sr-rp-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sr-rp-table {
  width: 100%;
  border-collapse: collapse !important;
  border: 0 !important;
  margin: 0 !important;
  font-size: 13.5px;
}

.sr-rp-table thead th {
  padding: 11px 18px !important;
  background: rgba(255, 255, 255, 0.52) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-align: left;
  white-space: nowrap;
}

.sr-rp-table tbody td,
.sr-rp-table tfoot td {
  padding: 13px 18px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.55) !important;
  vertical-align: middle;
  color: #1e293b;
}

.sr-rp-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.55);
}

.sr-rp-table tfoot td {
  background: rgba(248, 250, 252, 0.85) !important;
  border-top: 1px solid rgba(203, 213, 225, 0.85) !important;
  border-bottom: 0 !important;
  font-weight: 600;
}

.sr-rp-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.sr-rp-mono {
  font-family: var(--sr-font-mono) !important;
  font-variant-numeric: tabular-nums;
}

.sr-rp-cell-title {
  font-weight: 600;
  color: #0f172a;
}

.sr-rp-cell-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.sr-rp-muted {
  color: #64748b;
  font-size: 12px;
}

.sr-rp-pass {
  color: #047857 !important;
  font-weight: 700;
}

.sr-rp-fail {
  color: #b91c1c !important;
  font-weight: 700;
}

.sr-rp-code {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #e2e8f0;
  font-family: var(--sr-font-mono);
  font-size: 11.5px;
  color: #1e293b;
}

/* College Avatars */
.sr-rp-avatar {
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 55%, #eff6ff 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sr-font-display);
  font-weight: 700;
  color: #475569;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.sr-rp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sr-rp-avatar--md { width: 44px; height: 44px; border-radius: 11px; font-size: 13px; }
.sr-rp-avatar--lg { width: 56px; height: 56px; border-radius: 14px; font-size: 16px; }

.sr-rp-inst-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sub-marks box & Admin helpers */
.sr-rp-submarks-box {
  padding: 12px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(203, 213, 225, 0.7);
}

.sr-rp-submarks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.sr-rp-submarks-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.sr-rp-submarks-quick button {
  background: none;
  border: 0;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}

.sr-rp-submark-row {
  display: grid;
  grid-template-columns: 1fr 84px auto;
  gap: 6px;
  margin-bottom: 6px;
}

.sr-rp-live-preview {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #1d4ed8;
}

.sr-rp-divider {
  height: 1px;
  background: rgba(226, 232, 240, 0.8);
}

.sr-rp-checks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.sr-rp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}

.sr-rp-inline-photo-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sr-rp-file-compact {
  max-width: 190px;
  font-size: 11.5px;
}

.sr-rp-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sr-rp-link-danger {
  background: none;
  border: 0;
  padding: 0;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sr-rp-sub-list {
  margin: 0 0 6px 16px;
  padding: 0;
  list-style: disc;
  font-size: 12.5px;
}

.sr-rp-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
}

.sr-rp-mini-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.sr-rp-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sr-rp-notice {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.sr-rp-notice--success {
  background: rgba(236, 253, 245, 0.9);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.sr-rp-notice--error {
  background: rgba(254, 242, 242, 0.92);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.sr-rp-empty-cell {
  text-align: center;
  padding: 32px 16px !important;
  color: #64748b;
  font-size: 13px;
}

/* Public Portal Card */
.sr-rp-portal-card {
  overflow: hidden;
}

.sr-rp-portal-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sr-rp-portal-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  padding-bottom: 18px;
}

.sr-rp-portal-org {
  margin: 0 0 4px !important;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.sr-rp-portal-title {
  margin: 0 !important;
  font-family: var(--sr-font-display) !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
}

.sr-rp-portal-sub {
  margin: 4px 0 0 !important;
  font-size: 12.5px;
  color: #64748b;
}

.sr-rp-portal-backrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.sr-rp-back-btn {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569 !important;
  cursor: pointer;
}

.sr-rp-back-btn:hover {
  color: #1d4ed8 !important;
}

.sr-rp-portal-brandrow {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* College Directory List */
.sr-rp-college-list {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.sr-rp-college-item {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 10px !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.65) !important;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.sr-rp-college-item:last-child {
  border-bottom: 0 !important;
}

.sr-rp-college-item:hover {
  background: rgba(255, 255, 255, 0.65) !important;
}

.sr-rp-college-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sr-rp-college-item-name {
  font-family: var(--sr-font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.sr-rp-college-item:hover .sr-rp-college-item-name {
  color: #1d4ed8;
}

.sr-rp-college-item-meta {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.sr-rp-college-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.sr-rp-college-cta {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
}

/* Search & Exam Tabs */
.sr-rp-exam-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sr-rp-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.sr-rp-empty-box {
  padding: 28px 20px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: rgba(248, 250, 252, 0.62);
}

.sr-rp-empty-title {
  margin: 0 0 4px !important;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

/* Result Statement Card */
.sr-rp-statements {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sr-rp-statement {
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}

.sr-rp-statement-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.sr-rp-statement-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sr-rp-statement-org {
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
}

.sr-rp-statement-name {
  margin: 2px 0 0 !important;
  font-family: var(--sr-font-display) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.sr-rp-statement-id {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.sr-rp-statement-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sr-rp-statement-outcome {
  text-align: right;
  font-size: 13.5px;
}

/* Footers */
.sr-rp-footer,
.sr-rp-portal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  color: #64748b;
}

.sr-rp-footer-credit {
  font-weight: 600;
  color: #475569;
}

@media (max-width: 960px) {
  .sr-rp-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sr-rp-dashboard-grid { grid-template-columns: 1fr; }
  .sr-rp-form-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sr-rp-col-2 { grid-column: span 2; }
}

@media (max-width: 640px) {
  .sr-rp-portal-stage { padding: 12px; }
  .sr-rp-portal-body { padding: 18px; }
  .sr-rp-search-form { grid-template-columns: 1fr; }
  .sr-rp-form-grid--2,
  .sr-rp-form-grid--3,
  .sr-rp-form-grid--5,
  .sr-rp-checks-grid { grid-template-columns: 1fr; }
  .sr-rp-col-2 { grid-column: span 1; }
  .sr-rp-kpi-strip { grid-template-columns: 1fr; }
  .sr-rp-kpi { border-right: 0; border-bottom: 1px solid rgba(226, 232, 240, 0.7); }
}

@media print {
  .sr-rp-portal-stage,
  .sr-rp-glass-panel {
    background: #ffffff !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
  }
  .sr-rp-print-hide,
  .sr-rp-search-form,
  .sr-rp-exam-section,
  .sr-rp-portal-backrow {
    display: none !important;
  }
}
