/* ═══════════════════════════════════════════════════════
   AICRI™ Assessment Portal — nacri.css
   Adhithya Innovations® · White Header Theme · Dark Blue Text
   ═══════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { background: #f0f4ff; min-height: 100vh; }
input, textarea, select, button { font-family: inherit; font-size: 14px; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #9ca3af; border-radius: 3px; }
.screen { display: none; }
.screen.active { display: block; }
#loginScreen.active { display: block; min-height: 0; height: 0; }

/* ── LOGIN PAGE ── */
.login-bg {
  /* Break out of all WordPress/Divi containers and cover full viewport */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background:
    /* Grid overlay */
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    /* Diagonal stripes */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.015) 40px,
      rgba(255,255,255,0.015) 80px
    ),
    /* Base dark blue gradient */
    linear-gradient(135deg, #0a1628 0%, #0f2347 30%, #0d1e40 60%, #071020 100%);
  background-size: 60px 60px, 60px 60px, 80px 80px, cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  z-index: 9999;
}
.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 50%, rgba(30,80,180,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(245,158,11,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 90%, rgba(10,30,90,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 70% 50%, rgba(100,150,255,0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: loginBgPulse 8s ease-in-out infinite alternate;
}
.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.07) 1px, transparent 1px),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 40% 70%, rgba(255,255,255,0.06) 1px, transparent 1px),
    radial-gradient(circle at 60% 10%, rgba(245,158,11,0.15) 2px, transparent 2px),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,0.04) 1px, transparent 1px),
    radial-gradient(circle at 10% 85%, rgba(100,170,255,0.1) 2px, transparent 2px),
    radial-gradient(circle at 55% 55%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 180px 180px, 220px 200px, 160px 200px, 300px 250px, 240px 220px, 190px 170px, 200px 200px;
  pointer-events: none;
}
@keyframes loginBgPulse {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 4px 40px rgba(30,58,95,0.10), 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #e8eef7;
  position: relative;
  z-index: 1;
}
.login-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.login-logo-img {
  height: 60px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}
.login-sep {
  height: 2px;
  background: linear-gradient(90deg, #1e3a5f, #1e40af, #f59e0b);
  margin: 14px 0;
  border-radius: 99px;
}
.login-title {
  font-size: 22px;
  color: #1e3a5f;
  font-weight: 900;
  margin-bottom: 4px;
  text-align: center;
}
.login-desc {
  font-size: 11.5px;
  color: #6b7280;
  margin-bottom: 22px;
  text-align: center;
  line-height: 1.5;
}
.role-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}
.rtab {
  flex: 1;
  padding: 9px 4px;
  border-radius: 7px;
  border: none;
  font-weight: 700;
  font-size: 12px;
  background: transparent;
  color: #6b7280;
  transition: all .2s;
}
.rtab.active { background: #1e3a5f; color: #fff; }
.fgroup { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fgroup label { font-size: 12px; font-weight: 600; color: #374151; }
.fgroup input, .fgroup textarea, .fgroup select {
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  outline: none;
  width: 100%;
  transition: border .2s;
}
.fgroup input:focus, .fgroup textarea:focus, .fgroup select:focus { border-color: #1e3a5f; }
.pw-row { display: flex; gap: 6px; }
.pw-row input { flex: 1; }
.eye-btn { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 0 12px; font-size: 18px; line-height: 1; min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transition: background .15s; flex-shrink: 0; }
.eye-btn:hover { background: #e5e7eb; }
.login-hint {
  font-size: 11px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 8px 12px;
  color: #075985;
  margin-bottom: 14px;
}
.login-panel-label {
  font-size: 13px;
  font-weight: 800;
  color: #1e3a5f;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  text-align: center;
  letter-spacing: 0.02em;
}
.login-err {
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  display: none;
}
.login-ft { text-align: center; font-size: 10px; color: #9ca3af; margin-top: 22px; }

/* ── BUTTONS ── */
.btn-p {
  background: linear-gradient(135deg, #1e3a5f, #1e40af);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: opacity .2s;
}
.btn-p:hover { opacity: .88; }
.btn-s {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: none; border-radius: 10px; padding: 13px 32px; font-weight: 700; font-size: 15px; }
.btn-green { background: linear-gradient(135deg, #065f46, #047857); color: #fff; border: none; border-radius: 10px; padding: 12px 24px; font-weight: 700; }
.btn-red { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; border: none; border-radius: 10px; padding: 12px 24px; font-weight: 700; }
.btn-sm { padding: 4px 10px; border-radius: 6px; border: none; font-weight: 700; font-size: 11px; cursor: pointer; }
.btn-sm-b { background: #dbeafe; color: #1e40af; }
.btn-sm-r { background: #fee2e2; color: #dc2626; }
.w100 { width: 100%; display: block; padding: 14px; border-radius: 12px; }

/* ── APP BAR (WHITE BACKGROUND, DARK BLUE TEXT) ── */
.appbar {
  background: #ffffff;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(30,58,95,0.10);
  border-bottom: 2px solid #e8eef7;
  width: 100%;
}
.appbar-l { display: flex; align-items: center; gap: 12px; }
.appbar-logo { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.ab-divider { width: 1px; height: 36px; background: #e5e7eb; margin: 0 4px; }
.ab-portal-title { font-size: 13px; font-weight: 800; color: #1e3a5f; letter-spacing: 0.5px; }
.ab-portal-sub { font-size: 10px; color: #6b7280; letter-spacing: 1px; }
.ab-center { font-size: 12px; color: #1e3a5f; font-weight: 800; letter-spacing: 1px; }
.ab-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 12px;
  color: #1e3a5f;
  font-weight: 700;
}
.logout-btn {
  background: #1e3a5f;
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s;
}
.logout-btn:hover { background: #1e40af; }

/* ── PROGRESS BAR ── */
.prog-bar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 14px 24px; }
.prog-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; }
.pstep { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pdot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; background: #e5e7eb; color: #9ca3af; transition: all .3s; }
.pdot.done { background: #22c55e; color: #fff; }
.pdot.active { background: #1e3a5f; color: #fff; }
.plbl { font-size: 10px; color: #9ca3af; white-space: nowrap; }
.plbl.done { color: #22c55e; }
.plbl.active { color: #1e3a5f; font-weight: 700; }
.pline { flex: 1; height: 2px; background: #e5e7eb; margin: 0 2px; margin-bottom: 20px; transition: background .3s; }
.pline.done { background: #22c55e; }

/* ── BODY ── */
.body-wrap { max-width: 860px; margin: 24px auto; padding: 0 16px; width: 100%; }

/* ── CARDS ── */
.card { background: #fff; border-radius: 16px; box-shadow: 0 2px 16px rgba(0,0,0,.08); overflow: hidden; margin-bottom: 20px; }
.phdr { display: flex; gap: 16px; align-items: flex-start; padding: 24px; }
.phdr-icon { font-size: 42px; }
.phdr-text { flex: 1; }
.ptag { font-size: 11px; color: rgba(255,255,255,.6); font-weight: 600; letter-spacing: 1px; }
.phdr h2 { margin: 4px 0; color: #fff; font-size: 21px; }
.phdr p { margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }
.pts-live { background: rgba(255,255,255,.15); border-radius: 14px; padding: 14px 22px; text-align: center; min-width: 90px; }
.pts-num { font-size: 34px; font-weight: 900; color: #f59e0b; line-height: 1; }
.pts-lbl { font-size: 12px; color: rgba(255,255,255,.8); }
.p1h { background: linear-gradient(135deg, #1e3a5f, #1e40af); }
.p2h { background: linear-gradient(135deg, #065f46, #047857); }
.p3h { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.p4h { background: linear-gradient(135deg, #92400e, #d97706); }

/* ── QUESTION BLOCKS ── */
.qblock { background: #f8faff; border-radius: 14px; border: 1px solid #e0e7ff; overflow: hidden; margin-bottom: 18px; }
.qblock-top { background: #fff; padding: 16px 20px; border-bottom: 1px solid #e0e7ff; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.q-title { font-weight: 700; color: #1e3a5f; font-size: 14px; margin-bottom: 5px; }
.q-tag { background: #1e3a5f; color: #fff; border-radius: 5px; padding: 2px 9px; font-size: 11px; font-weight: 800; margin-right: 8px; }
.q-desc { font-size: 12px; color: #6b7280; line-height: 1.5; }
.score-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.score-lbl { font-size: 11px; color: #6b7280; font-weight: 600; }

/* ── SCHOOL SCORE ROW (visible to auditor only) ── */
.school-score-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1.5px solid #7dd3fc;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.school-score-lbl {
  font-size: 10px;
  font-weight: 800;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.school-score-btns {
  display: flex;
  gap: 4px;
  align-items: center;
}
.sbtn-school-readonly {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0369a1;
  border: 1.5px solid #bae6fd;
  cursor: default;
  user-select: none;
  opacity: 0.55;
}
.sbtn-school-readonly.ss-active {
  background: #0369a1;
  color: #fff;
  border-color: #0284c7;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(3,105,161,0.4);
}
.school-score-tag {
  font-size: 10px;
  font-weight: 700;
  margin-top: 1px;
}
.score-btns { display: flex; gap: 5px; }
.sbtn { width: 33px; height: 33px; border-radius: 8px; border: none; font-weight: 800; font-size: 13px; background: #e5e7eb; color: #374151; transition: all .15s; }
.sbtn.ss { background: #1e3a5f; color: #fff; transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.sbtn.sa { background: #7c3aed; color: #fff; transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.rlbl { font-size: 10px; font-weight: 700; }
.qbody { padding: 14px; display: grid; gap: 12px; }
.qbody.two { grid-template-columns: 1fr 1fr; }
.qbody.one { grid-template-columns: 1fr; }
.ev-ro { padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 10px; font-size: 12px; color: #6b7280; background: #f3f4f6; min-height: 70px; line-height: 1.5; }
.snav { display: flex; justify-content: space-between; align-items: center; padding: 0 24px 24px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px; }

/* ── FILE UPLOAD EVIDENCE ── */
.evidence-section { margin-top: 8px; }
.file-upload-area {
  border: 2px dashed #c4b5fd;
  border-radius: 10px;
  padding: 10px 14px;
  background: #f5f3ff;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  font-size: 12px;
  color: #7c3aed;
  font-weight: 600;
  position: relative;
}
.file-upload-area:hover { border-color: #7c3aed; background: #ede9fe; }
.file-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: none; padding: 0;
}
.file-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #e0e7ff; border-radius: 8px; padding: 6px 10px;
  font-size: 11px; color: #374151;
}
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; color: #1e3a5f; font-weight: 600; }
.file-item-size { color: #9ca3af; font-size: 10px; margin-right: 8px; }
.file-item-del { background: #fee2e2; color: #dc2626; border: none; border-radius: 5px; padding: 2px 7px; font-size: 11px; font-weight: 700; cursor: pointer; }
.file-count-badge {
  display: inline-block; background: #7c3aed; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 700; margin-left: 6px;
}

/* ── UNDER AUDITOR EXAMINATION BANNER ── */
.under-audit-banner {
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.under-audit-banner .audit-icon { font-size: 28px; }
.under-audit-banner .audit-text { flex: 1; }
.under-audit-banner .audit-title { font-size: 14px; font-weight: 800; color: #92400e; }
.under-audit-banner .audit-desc { font-size: 12px; color: #78350f; margin-top: 2px; }

/* Auditor comment read-only display for school */
.auditor-comment-box {
  background: #f5f3ff;
  border: 1.5px solid #c4b5fd;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #5b21b6;
  min-height: 60px;
  line-height: 1.5;
  font-style: italic;
}
.auditor-comment-label {
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── ADMIN PANEL ── */
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-box { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.stat-lbl { font-size: 10px; color: #9ca3af; margin-bottom: 4px; }
.stat-val { font-size: 26px; font-weight: 900; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.atab { padding: 10px 22px; border-radius: 10px; border: none; font-weight: 700; font-size: 13px; background: #fff; color: #374151; box-shadow: 0 1px 4px rgba(0,0,0,.1); transition: all .2s; }
.atab.active { background: #1e3a5f; color: #fff; }
.card-pad { padding: 24px; }
.card-title { font-size: 16px; font-weight: 800; color: #1e3a5f; margin-bottom: 18px; }
.create-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.msg-box { border-radius: 10px; padding: 12px 18px; margin-bottom: 20px; font-weight: 600; font-size: 14px; display: none; }
.msg-ok { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.msg-err { background: #fee2e2; border: 1px solid #fca5a5; color: #dc2626; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: #1e3a5f !important; color: #fff !important; }
th { padding: 10px 12px; text-align: left; font-weight: 700; font-size: 12px; white-space: nowrap; color: #fff !important; }
td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; font-size: 13px; vertical-align: middle; }
.odd { background: #f9fafb; }
.even { background: #fff; }
.badge-pill { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; display: inline-block; }

/* ── RESULTS ── */
.result-hero { padding: 44px; text-align: center; }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bd-box { background: #f8faff; border-radius: 14px; padding: 20px; border: 1px solid #e0e7ff; }
.bd-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bd-bar-bg { background: #e5e7eb; border-radius: 99px; height: 12px; overflow: hidden; margin-bottom: 8px; }
.bd-bar { height: 100%; border-radius: 99px; }
.badge-guide { background: #fefce8; border: 1px solid #fde68a; border-radius: 12px; padding: 20px; margin: 0 28px 20px; }
.badge-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge-box { border-radius: 10px; padding: 12px 14px; text-align: center; font-size: 13px; font-weight: 700; border: 1px solid #e5e7eb; }
.badge-box.sel { box-shadow: 0 4px 12px rgba(0,0,0,.2); border: none; color: #fff; }
.result-actions { display: flex; gap: 12px; padding: 0 28px 28px; justify-content: center; flex-wrap: wrap; }

/* ── PENDING AUDITOR EVALUATION DISPLAY (school view) ── */
.pending-eval-card {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
}
.pending-eval-icon { font-size: 56px; margin-bottom: 12px; }
.pending-eval-title { font-size: 22px; font-weight: 900; color: #1e3a5f; margin-bottom: 8px; }
.pending-eval-desc { font-size: 14px; color: #3b82f6; font-weight: 600; }

/* ── BADGE AWARDED DISPLAY ── */
.badge-awarded-card {
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  margin-bottom: 20px;
  color: #fff;
}

/* ── PAGINATION ── */
.pagination { display: flex; gap: 8px; margin-top: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ── MODAL ── */
.modal-ov { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-ov.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: 90vh; overflow-y: auto; }
.modal-box.wide { max-width: 680px; }
.modal-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { color: #1e3a5f; font-weight: 800; font-size: 17px; }
.modal-close { background: #f3f4f6; border: none; border-radius: 8px; padding: 6px 14px; cursor: pointer; font-weight: 700; }

/* ── PRINT ── */
@media print {
  .appbar, .prog-bar, .snav, .admin-tabs, .no-print { display: none !important; }
  .card { box-shadow: none; border: 1px solid #e5e7eb; }
  body { background: #fff; }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .create-grid, .info-grid, .bd-grid, .badge-grid4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .ab-center { display: none; }
  .qblock-top { flex-direction: column; }
  .qbody.two { grid-template-columns: 1fr; }
  .appbar-logo { height: 32px; }
}

/* ── Auditor File Viewer ── */
.aud-file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.aud-file-item {
  background: #f8faff;
  border: 1px solid #c7d7f7;
  border-radius: 10px;
  padding: 12px 14px;
}
.aud-file-preview img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  border: 1px solid #e0e7ff;
  display: block;
  margin-top: 8px;
}

/* ── SAVE WORK BUTTON ── */
.btn-save-work {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  transition: background .2s;
}
.btn-save-work:hover { background: #065f46; }

/* ── APP COPYRIGHT BAR ── */
.app-copyright {
  background: #1e3a5f;
  color: rgba(255,255,255,.75);
  text-align: center;
  font-size: 10px;
  padding: 6px 24px;
  letter-spacing: 0.3px;
  font-weight: 500;
}

/* ── ADMIN COPYRIGHT BAR ── */
.admin-copyright {
  background: #1e3a5f;
  color: rgba(255,255,255,.75);
  text-align: center;
  font-size: 10px;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 10px;
  font-weight: 500;
}

/* ── EXPIRED CERTS ── */
#expiredTbody td { font-size: 13px; }

/* ── ENHANCED MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  /* Login — full width on mobile */
  .login-bg { padding: 0; align-items: flex-start; }
  .login-card { padding: 24px 18px; border-radius: 0; max-width: 100%; width: 100%; min-height: 100vh; box-shadow: none; border: none; }
  .login-title { font-size: 18px; }
  .login-desc { font-size: 11px; }
  .login-logo-img { height: 48px; }
  .role-tabs { gap: 4px; }
  .rtab { font-size: 11px; padding: 8px 4px; }

  /* Appbar — compact, no overflow */
  .appbar { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .appbar-l { gap: 6px; flex: 1; min-width: 0; }
  .appbar-logo { height: 30px; flex-shrink: 0; }
  .ab-portal-title { font-size: 10px; white-space: nowrap; }
  .ab-portal-sub { font-size: 8px; white-space: nowrap; }
  .ab-center { display: none; }
  .ab-right { gap: 6px; flex-shrink: 0; }
  .user-chip { font-size: 10px; padding: 4px 10px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logout-btn { padding: 6px 12px; font-size: 12px; }
  .btn-save-work { padding: 6px 10px; font-size: 11px; }
  .app-copyright { font-size: 9px; padding: 5px 12px; }

  /* Progress bar — scrollable */
  .prog-bar { padding: 10px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prog-inner { min-width: 480px; }
  .plbl { font-size: 7px; }
  .pdot { width: 24px; height: 24px; font-size: 10px; }

  /* Body wrap */
  .body-wrap { margin: 8px auto; padding: 0 8px; }

  /* Cards */
  .card-pad { padding: 14px; }
  .phdr { padding: 14px; gap: 10px; }
  .phdr h2 { font-size: 16px; }
  .phdr-icon { font-size: 28px; }
  .pts-num { font-size: 24px; }

  /* Admin wrap */
  .admin-wrap { padding: 10px; }
  .admin-copyright { font-size: 9px; padding: 6px 12px; margin-bottom: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
  .stat-val { font-size: 20px; }
  .stat-lbl { font-size: 9px; }
  .stat-box { padding: 10px 12px; }

  /* Admin tabs — horizontal scroll */
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; gap: 6px; }
  .atab { white-space: nowrap; padding: 8px 12px; font-size: 11px; flex-shrink: 0; }

  /* Tables scroll on mobile */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 480px; }
  td, th { padding: 8px 10px; font-size: 12px; }

  /* Grids — single column */
  .create-grid { grid-template-columns: 1fr; gap: 10px; }
  .info-grid { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .bd-grid { grid-template-columns: 1fr; }
  .badge-grid4 { grid-template-columns: repeat(2, 1fr); }

  /* Question blocks */
  .qblock-top { flex-direction: column; gap: 8px; }
  .qbody.two { grid-template-columns: 1fr; }
  .score-btns { flex-wrap: wrap; gap: 4px; }
  .sbtn { width: 30px; height: 30px; font-size: 12px; }

  /* Nav buttons */
  .snav { padding: 0 10px 14px; flex-wrap: wrap; gap: 8px; }

  /* Buttons */
  .btn-p, .btn-s, .btn-gold, .btn-green, .btn-red { padding: 11px 16px; font-size: 13px; }

  /* Modal — sheet from bottom */
  .modal-ov { padding: 0; align-items: flex-end; }
  .modal-box { padding: 18px; border-radius: 16px 16px 0 0; max-height: 92vh; width: 100%; max-width: 100%; }
  .modal-box.wide { max-width: 100%; }

  /* Results */
  .result-hero { padding: 20px 14px; }
  .result-actions { padding: 0 14px 14px; gap: 8px; flex-wrap: wrap; justify-content: center; }

  /* Forms — 16px prevents iOS auto-zoom */
  .fgroup input, .fgroup textarea, .fgroup select { font-size: 16px; padding: 12px 14px; }
  .fgroup label { font-size: 13px; }
  .pw-row input { font-size: 16px; }
  .eye-btn { min-width: 48px; height: 48px; }

  .under-audit-banner { flex-direction: column; text-align: center; padding: 12px; }
  .pagination { gap: 4px; }
  .login-ft { font-size: 9px; }
  .badge-guide { padding: 14px; margin: 0 0 14px; }
}

@media (max-width: 400px) {
  .login-card { padding: 20px 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .badge-grid4 { grid-template-columns: 1fr 1fr; }
  .role-tabs { gap: 2px; }
  .rtab { font-size: 10px; padding: 7px 2px; }
  .fgroup input, .fgroup textarea, .fgroup select { font-size: 16px; }
  .pw-row input { font-size: 16px; }
  .user-chip { max-width: 90px; font-size: 9px; }
  .ab-portal-sub { display: none; }
}

/* ═══════════════════════════════════════
   v2 Additions — Radar, Certs, Benchmark
═══════════════════════════════════════ */
.stat-card {
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }

/* Badge grid extended for Emerging */
.badge-grid5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

/* Certificate canvas wrapper */
.cert-preview-wrap {
  text-align: center;
  padding: 16px;
  background: #f0f4f8;
  border-radius: 10px;
  overflow: auto;
}
.cert-preview-wrap canvas {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* National report modal content */
#nationalReportContent table th {
  text-align: left;
  font-weight: 700;
}
#nationalReportContent table tr:hover td {
  background: #f0f9ff !important;
}

/* Signature preview */
#sigPreview {
  display: block;
  max-height: 100px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px;
  background: #f8fafc;
}

/* Auditor cert button */
.btn-cert {
  background: linear-gradient(135deg,#7c3aed,#4c1d95);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: opacity .15s;
}
.btn-cert:hover { opacity: .9; }

@media (max-width: 600px) {
  .badge-grid5 { grid-template-columns: repeat(2, 1fr); }
}

/* ── TABLE HEADER WHITE TEXT OVERRIDE (beats WordPress/Divi) ── */
table thead tr,
table thead tr th,
.tbl-wrap table thead tr,
.tbl-wrap table thead tr th,
#adminScreen table thead tr th,
#adminScreen table thead th {
  background-color: #1e3a5f !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════
   v4 — WP Coder / Divi Full-Width & Line-Kill Patch
   Applied as LAST rules so they always win.
   ═══════════════════════════════════════════════════ */

/* Kill ALL Divi column borders and vertical lines */
.et_pb_column,
.et_pb_row .et_pb_column,
.et_pb_section .et_pb_row .et_pb_column {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Kill pseudo-elements that Divi uses for decoration */
.et_pb_column::before,
.et_pb_column::after,
.et_pb_row::before,
.et_pb_row::after,
.et_pb_section::before,
.et_pb_section::after {
  display: none !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
  content: '' !important;
  width: 0 !important;
  height: 0 !important;
}

/* NOTE: NO background:transparent here — AICRI app controls its own backgrounds */
/* Full-width layout without breaking backgrounds */
#page-container,
#et-main-area,
#et-boc,
#content-area,
#main-content,
.et_pb_section,
.et_pb_row,
.et_pb_column,
.et_pb_module,
.et_pb_text,
.et_pb_text_inner,
.entry-content,
.post-content {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}