/* —— لوحة فحص الاستلال + AI (مطابقة التصميم المرجعي) —— */
#modal.show:has(.plagiarism-modal-box) {
  background: #07090f;
  padding: 0;
  align-items: stretch;
}
#modal.show:has(.plagiarism-modal-box) .modal-box {
  margin: 0;
}
.plagiarism-modal-box {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #0b1220 !important;
  border: none !important;
  box-shadow: none !important;
}
.modal.show:has(.plagiarism-modal-box) .modal-box.plagiarism-modal-box .modal-head,
.plagiarism-modal-box .modal-head {
  display: none !important;
}
.plagiarism-modal-box .modal-body,
.plagiarism-modal-box #modalBody {
  flex: 1;
  overflow: auto;
  padding: 0 !important;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.plagiarism-modal-box .modal-body::-webkit-scrollbar,
.plagiarism-modal-box #modalBody::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.plagiarism-modal-box #modalResult {
  display: none !important;
}
.plagiarism-modal-box .modal-result-strip {
  display: none !important;
}

.plag-dash {
  --pd-bg: #0e1628;
  --pd-card: rgba(18, 36, 64, 0.78);
  --pd-card2: rgba(28, 52, 92, 0.72);
  --pd-border: rgba(96, 165, 250, 0.22);
  --pd-text: #f8fafc;
  --pd-muted: #b6c4d8;
  --pd-purple: #a78bfa;
  --pd-blue: #60a5fa;
  --pd-green: #4ade80;
  --pd-orange: #fb923c;
  --pd-red: #f87171;
  --pd-yellow: #fcd34d;
  direction: rtl;
  text-align: right;
  color: var(--pd-text);
  background:
    radial-gradient(ellipse 80% 50% at 90% 0%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 80%, rgba(37, 99, 235, 0.16), transparent 50%),
    var(--pd-bg);
  min-height: 100%;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px calc(12px + env(safe-area-inset-bottom, 0px));
  font-family: inherit;
}

/* — topbar — */
.plag-dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.plag-dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.plag-dash-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
}
.plag-dash-topbar h1 {
  margin: 0 0 2px;
  font-size: clamp(0.95rem, 3.4vw, 1.22rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.plag-dash-topbar p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--pd-muted);
  line-height: 1.4;
}
.plag-dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.plag-dash-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pd-muted);
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.plag-dash-icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.plag-dash-close-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #DC2626;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.15s ease;
}
.plag-dash-close-icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
.plag-dash-close-btn:hover {
  background: #B91C1C;
  color: #fff;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
}
.plag-dash-close-btn:focus-visible {
  outline: none;
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}
.plag-dash-close-btn:active {
  transform: scale(0.94);
  background: #b91c1c;
  border-color: #dc2626;
  color: #fff;
}
.plag-dash-new-scan-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.plag-dash-new-scan-btn:hover {
  background: rgba(59, 130, 246, 0.28);
  color: #fff;
}
.plag-dash-report-count {
  font-size: 0.74rem;
  color: #e2e8f0;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.plag-dash-verdict { display: none !important; }
.plag-dash-verdict-body { flex: 1; min-width: 0; }
.plag-dash-verdict-summaries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 720px) {
  .plag-dash-verdict-summaries { grid-template-columns: 1fr; }
}
.plag-dash-verdict-sum {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.74rem;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--pd-border);
}
.plag-dash-verdict-sum span {
  display: block;
  font-weight: 900;
  font-size: 0.72rem;
  margin-bottom: 4px;
  color: #e2e8f0;
}
.plag-dash-verdict-sum p { margin: 0; color: var(--pd-muted); }
.plag-dash-verdict-sum--plag { border-color: rgba(248, 113, 113, 0.25); }
.plag-dash-verdict-sum--ai { border-color: rgba(251, 146, 60, 0.25); }
.plag-dash-verdict--pass {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
}
.plag-dash-verdict--warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
}
.plag-dash-verdict--fail {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
}
.plag-dash-verdict-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}
.plag-dash-verdict--pass .plag-dash-verdict-icon { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.plag-dash-verdict--warn .plag-dash-verdict-icon { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.plag-dash-verdict--fail .plag-dash-verdict-icon { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.plag-dash-verdict strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
  color: var(--pd-text);
}
.plag-dash-verdict-body > p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--pd-muted);
  line-height: 1.55;
}
.plag-dash-verdict p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--pd-muted);
  line-height: 1.55;
}

/* — وضع النتائج: إخفاء الإدخال بالكامل — */
.plag-dash--results #plagDashInputPhase {
  display: none !important;
}
.plag-dash-results-phase {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.plag-dash-scores-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.plag-dash-score-chip {
  flex: 1;
  min-width: 110px;
  max-width: 200px;
  text-align: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--pd-border);
  background: linear-gradient(165deg, var(--pd-card2) 0%, var(--pd-card) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.plag-dash-score-chip span {
  display: block;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.plag-dash-score-chip small {
  display: block;
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 6px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.plag-dash-score-chip--orig {
  border-color: rgba(74, 222, 128, 0.45);
  background: linear-gradient(165deg, rgba(74, 222, 128, 0.12) 0%, var(--pd-card) 100%);
}
.plag-dash-score-chip--plag {
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(165deg, rgba(248, 113, 113, 0.12) 0%, var(--pd-card) 100%);
}
.plag-dash-score-chip--ai {
  border-color: rgba(251, 146, 60, 0.45);
  background: linear-gradient(165deg, rgba(251, 146, 60, 0.12) 0%, var(--pd-card) 100%);
}
.plag-dash-score-chip--orig span { color: #86efac; }
.plag-dash-score-chip--plag span { color: #fca5a5; }
.plag-dash-score-chip--ai span { color: #fdba74; }

.plag-dash-scan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: -4px 0 2px;
}
.plag-dash-scan-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--pd-border);
  font-size: 0.76rem;
  font-weight: 700;
  color: #c4b5fd;
}

.plag-dash-skeleton {
  padding: 28px 16px;
  text-align: center;
  color: var(--pd-muted);
  font-weight: 700;
  animation: plag-dash-pulse 1.1s ease-in-out infinite;
}
@keyframes plag-dash-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.plag-dash-drag-scroll {
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.plag-dash-drag-scroll.plag-dash-dragging {
  cursor: grabbing !important;
  user-select: none;
}
.plag-dash-drag-scroll.plag-dash-dragging * {
  user-select: none;
  pointer-events: none;
}
.plag-dash-drag-scroll.plag-dash-dragging button,
.plag-dash-drag-scroll.plag-dash-dragging a {
  pointer-events: auto;
}

.plag-dash-full-report {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plag-dash-report-section {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  overflow: hidden;
}
.plag-dash-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-bottom: 1px solid var(--pd-border);
}
.plag-dash-report-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}
.plag-dash-report-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.plag-dash-report-section--main .plag-dash-scroll-box--main {
  max-height: min(62vh, 640px);
}
.plag-dash-scroll-box {
  max-height: 320px;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 14px 16px;
  scrollbar-width: auto;
  scrollbar-color: #8b5cf6 rgba(255, 255, 255, 0.08);
}
.plag-dash-scroll-box::-webkit-scrollbar {
  width: 12px;
}
.plag-dash-scroll-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin: 4px 0;
}
.plag-dash-scroll-box::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a78bfa, #6366f1);
  border-radius: 999px;
  border: 2px solid rgba(12, 16, 24, 0.5);
  min-height: 40px;
}
.plag-dash-scroll-btns {
  display: flex;
  flex-direction: row;
  gap: 6px;
}
.plag-dash-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 2px solid rgba(167, 139, 250, 0.55);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.45) 0%, rgba(99, 102, 241, 0.35) 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.plag-dash-scroll-btn span {
  font-size: 0.68rem;
  font-weight: 800;
}
.plag-dash-scroll-btn:hover {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.65) 0%, rgba(129, 140, 248, 0.5) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}
.plag-dash-scroll-btn:active {
  transform: translateY(0);
}
.plag-dash-report-section--text .plag-dash-legend {
  padding: 10px 16px 0;
}
.plag-dash-report-section--text .plag-dash-scroll-box {
  padding-top: 10px;
}
.plag-dash-report-section--text .plag-dash-highlight-text {
  max-height: none;
  overflow: visible;
}

.plag-dash-seg-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plag-dash-seg-card {
  border-radius: 14px;
  border: 1px solid var(--pd-border);
  background: var(--pd-card2);
  padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.plag-dash-seg-card--plag {
  border-color: rgba(248, 113, 113, 0.5);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, var(--pd-card2) 100%);
}
.plag-dash-seg-card--sus {
  border-color: rgba(252, 211, 77, 0.45);
  background: linear-gradient(135deg, rgba(252, 211, 77, 0.08) 0%, var(--pd-card2) 100%);
}
.plag-dash-seg-card--ai {
  border-color: rgba(251, 146, 60, 0.5);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, var(--pd-card2) 100%);
}
.plag-dash-seg-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.plag-dash-seg-card-badge {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fca5a5;
  min-width: 46px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.15);
  text-align: center;
}
.plag-dash-seg-card--ai .plag-dash-seg-card-badge {
  color: #fdba74;
  background: rgba(251, 146, 60, 0.15);
}
.plag-dash-seg-card--sus .plag-dash-seg-card-badge {
  color: #fcd34d;
  background: rgba(252, 211, 77, 0.12);
}
.plag-dash-seg-card-tag {
  font-size: 0.74rem;
  color: #cbd5e1;
  font-weight: 700;
}
.plag-dash-seg-card-text {
  font-size: 0.85rem;
  line-height: 1.75;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}
.plag-dash-seg-card-reason {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.plag-dash-seg-card-actions {
  margin-top: 10px;
}
.plag-dash-suggest-inner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #d1fae5;
}
.plag-dash-suggest-inner p { margin: 6px 0 10px; }
.plag-dash-copy-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.plag-dash-copy-btn:hover { background: rgba(52, 211, 153, 0.28); color: #fff; }

.plag-dash--results {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 36px);
  overflow: hidden;
}
.plag-dash--results .plag-dash-footer {
  display: none !important;
}
.plag-dash--results #plagDashResultsPhase {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: auto;
  scrollbar-color: #8b5cf6 rgba(255, 255, 255, 0.08);
}
.plag-dash--results #plagDashResultsPhase::-webkit-scrollbar { width: 12px; }
.plag-dash--results #plagDashResultsPhase::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); }
.plag-dash--results #plagDashResultsPhase::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a78bfa, #6366f1);
  border-radius: 999px;
}

.plag-dash-upgrade-btn {
  display: none !important;
}

/* — grid rows — */
.plag-dash-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.plag-dash-row--hero {
  grid-template-columns: 1fr 1.15fr 0.95fr;
}
.plag-dash-row--panels {
  grid-template-columns: 0.9fr 1.35fr 0.95fr;
  min-height: 320px;
}

.plag-dash-card,
.plag-dash-panel {
  background: linear-gradient(165deg, rgba(22, 48, 88, 0.82) 0%, rgba(14, 32, 62, 0.9) 100%);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 16, 40, 0.28), inset 0 1px 0 rgba(147, 197, 253, 0.08);
}
.plag-dash-card--summary {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 12px 32px rgba(37, 99, 235, 0.22);
}
.plag-dash-card { padding: 16px; }
.plag-dash-panel {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.plag-dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pd-border);
  background: rgba(0, 0, 0, 0.35);
}
.plag-dash-panel-head h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 900;
  color: #f8fafc;
}
.plag-dash-panel-body {
  flex: 1;
  padding: 12px 14px;
  overflow: auto;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.plag-dash-panel-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* — upload card — */
.plag-dash-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 150px;
  padding: 18px 14px;
  border: 2px dashed rgba(124, 58, 237, 0.35);
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.06);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.plag-dash-upload-zone.dragover,
.plag-dash-upload-zone:hover {
  border-color: rgba(124, 58, 237, 0.65);
  background: rgba(124, 58, 237, 0.12);
}
.plag-dash-upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.9;
}
.plag-dash-upload-title {
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.plag-dash-upload-hint {
  font-size: 0.72rem;
  color: var(--pd-muted);
  margin-bottom: 12px;
}
.plag-dash-upload-btn {
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
}
.plag-dash-paste-toggle {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--pd-purple);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.plag-dash-input-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.plag-dash-input-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: var(--pd-card2);
  color: var(--pd-muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.plag-dash-input-tab.active {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.45);
  color: #e9d5ff;
}
.plag-dash-paste-area {
  margin-top: 0;
  display: none;
}
.plag-dash-paste-area.open { display: block; }
.plag-dash-paste-area textarea {
  width: 100%;
  min-height: 120px;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: var(--pd-card2);
  color: var(--pd-text);
  padding: 10px;
  font-size: 0.82rem;
  resize: vertical;
  line-height: 1.65;
}
.plag-dash-paste-hint {
  margin: 8px 0 0;
  font-size: 0.7rem;
  color: var(--pd-muted);
  text-align: center;
}
.plag-dash-file-meta {
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--pd-green);
  text-align: center;
}

/* — config card — */
.plag-dash-config-label {
  font-size: 0.72rem;
  color: var(--pd-muted);
  margin-bottom: 8px;
  font-weight: 700;
}
.plag-dash-check-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.plag-dash-pill {
  flex: 1;
  min-width: 0;
  position: relative;
}
.plag-dash-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.plag-dash-pill span {
  display: block;
  text-align: center;
  padding: 8px 6px;
  border-radius: 999px;
  border: 1px solid var(--pd-border);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--pd-muted);
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}
.plag-dash-pill input:checked + span {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.18);
  color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.25);
}
.plag-dash-lib-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.plag-dash-lib-select {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: var(--pd-card2);
  color: var(--pd-text);
  font-size: 0.78rem;
  font-weight: 700;
}
.plag-dash-customize-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pd-muted);
  cursor: pointer;
  font-size: 1rem;
}
.plag-dash-customize-panel {
  display: none;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.76rem;
}
.plag-dash-customize-panel.open { display: block; }
.plag-dash-customize-panel label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}
.plag-dash-scan-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 45%, #ec4899 100%);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.plag-dash-scan-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* — summary card — */
.plag-dash-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.plag-dash-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 8px 0 12px;
}
.plag-dash-ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.plag-dash-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}
.plag-dash-ring-fg {
  fill: none;
  stroke: url(#plagDashGrad);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.plag-dash-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.plag-dash-ring-pct {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.plag-dash-ring-label {
  font-size: 0.68rem;
  color: var(--pd-muted);
  margin-top: 2px;
}
.plag-dash-ring-grade {
  font-size: 0.62rem;
  font-weight: 800;
  color: #86efac;
  margin-top: 2px;
}
.plag-dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-bottom: 10px;
}
.plag-dash-stat {
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--pd-border);
}
.plag-dash-stat--copy { border-color: rgba(248, 113, 113, 0.4); background: rgba(220, 38, 38, 0.12); }
.plag-dash-stat--detect { border-color: rgba(251, 191, 36, 0.4); background: rgba(245, 158, 11, 0.12); }
.plag-dash-stat--ai { border-color: rgba(74, 222, 128, 0.4); background: rgba(34, 197, 94, 0.12); }
.plag-dash-stat--plag { border-color: rgba(96, 165, 250, 0.4); background: rgba(59, 130, 246, 0.12); }
.plag-dash-para-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 2px;
}
.plag-dash-para-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3B82F6, #DC2626);
  transition: width 0.5s ease;
}
.plag-dash-para-lbl {
  font-size: 0.68rem;
  color: var(--pd-muted);
  font-weight: 700;
  margin-top: 4px;
}
.plag-dash-stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
}
.plag-dash-stat--copy .plag-dash-stat-val { color: #fca5a5; }
.plag-dash-stat--detect .plag-dash-stat-val { color: #fcd34d; }
.plag-dash-stat-val--plag { color: #93c5fd; }
.plag-dash-stat-val--ai { color: #86efac; }
.plag-dash-stat-val--orig { color: #6ee7b7; }
.plag-dash-stat-lbl {
  font-size: 0.65rem;
  color: #cbd5e1;
  font-weight: 700;
}
.plag-dash-status-msg {
  font-size: 0.76rem;
  color: var(--pd-green);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-weight: 700;
}
.plag-dash-status-msg--idle { color: var(--pd-muted); font-weight: 600; }
.plag-dash-status-msg--busy { color: #c4b5fd; }

/* — stepper — */
.plag-dash-stepper {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.plag-dash-steps {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.plag-dash-steps::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.plag-dash--scanning .plag-dash-steps {
  overflow: hidden;
}
.plag-dash-step {
  flex: 1;
  min-width: 72px;
  text-align: center;
  font-size: 0.62rem;
  color: var(--pd-muted);
  position: relative;
}
.plag-dash-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--pd-border);
  background: var(--pd-card2);
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}
.plag-dash-step.done .plag-dash-step-dot {
  border-color: var(--pd-green);
  background: rgba(34, 197, 94, 0.15);
  color: var(--pd-green);
}
.plag-dash-step.active .plag-dash-step-dot {
  border-color: var(--pd-purple);
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}
.plag-dash-step.done .plag-dash-step-label,
.plag-dash-step.active .plag-dash-step-label {
  color: var(--pd-text);
  font-weight: 700;
}
.plag-dash-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.plag-dash-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  width: 0%;
  transition: width 0.4s ease;
}

/* — sources panel — */
.plag-dash-source-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pd-border);
}
.plag-dash-source-item:last-child { border-bottom: none; }
.plag-dash-source-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.plag-dash-source-info { flex: 1; min-width: 0; }
.plag-dash-source-name {
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f1f5f9;
}
.plag-dash-source-sub {
  font-size: 0.68rem;
  color: #cbd5e1;
}
.plag-dash-source-pct {
  font-size: 0.88rem;
  font-weight: 900;
  color: #fca5a5;
}
.plag-dash-show-all {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--pd-purple);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

/* — text panel — */
.plag-dash-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.68rem;
  color: #cbd5e1;
  font-weight: 700;
}
.plag-dash-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.plag-dash-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}
.plag-dash-legend .leg-orig { background: #60a5fa; }
.plag-dash-legend .leg-sus { background: #fbbf24; }
.plag-dash-legend .leg-ai { background: #fb923c; }
.plag-dash-legend .leg-plag { background: #f87171; }
.plag-dash-fullscan-note {
  font-size: 0.78rem;
  color: var(--pd-muted);
  line-height: 1.55;
  margin: 0 0 14px;
}
.plag-dash-detail-btn {
  margin-top: 0;
  width: auto;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}
.plag-dash-detail-btn:hover {
  background: rgba(139, 92, 246, 0.28);
  color: #fff;
}
.plag-dash-footer {
  display: none !important;
}
.plag-dash-footer .plag-dash-detail-btn {
  margin-inline-start: auto;
}
.plag-dash-mark { padding: 1px 3px; border-radius: 3px; }
.plag-dash-mark--plag { background: rgba(248, 113, 113, 0.38); border-bottom: 2px solid #f87171; color: #fff; }
.plag-dash-mark--sus { background: rgba(251, 191, 36, 0.32); border-bottom: 2px solid #fbbf24; color: #fff; }
.plag-dash-mark--ai { background: rgba(251, 146, 60, 0.35); border-bottom: 2px solid #fb923c; color: #fff; }
.plag-dash-source-link { color: #a5b4fc; text-decoration: none; font-weight: 800; }
.plag-dash-source-link:hover { color: #c7d2fe; text-decoration: underline; }
.plag-dash-source-reason, .plag-dash-source-snippet {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.45;
}
.plag-dash-source-meta {
  margin-top: 10px;
  font-size: 0.68rem;
  color: var(--pd-muted);
  text-align: center;
}
.plag-dash-flagged-title {
  margin: 12px 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
}
.plag-dash-flagged-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--pd-border);
}
.plag-dash-flagged-row .plag-paraphrase-suggest {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  padding: 8px;
  background: rgba(34,197,94,0.08);
  border-radius: 8px;
  border: 1px solid rgba(34,197,94,0.2);
}
.plag-dash-flagged-pct {
  font-weight: 900;
  color: #f87171;
  font-size: 0.82rem;
}
.plag-dash-flagged-text {
  font-size: 0.72rem;
  line-height: 1.5;
  color: #cbd5e1;
}
.plag-dash-paraphrase-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  color: #e9d5ff;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.plag-dash-paraphrase-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
  transform: translateY(-1px);
}
.plag-dash-paraphrase-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}
.plag-dash-ai-meta {
  font-size: 0.72rem;
  color: var(--pd-muted);
  text-align: center;
  margin: 0 0 10px;
}
.plag-dash-ai-flagged h4 {
  margin: 12px 0 6px;
  font-size: 0.76rem;
}
.plag-dash-ai-sent {
  font-size: 0.7rem;
  color: #cbd5e1;
  margin: 0 0 6px;
  line-height: 1.45;
}
.plag-dash-ai-sent span {
  color: #fb923c;
  font-weight: 900;
  margin-inline-end: 6px;
}
.plag-dash-highlight-text {
  font-size: 0.82rem;
  line-height: 1.9;
  color: #e2e8f0;
  max-height: 280px;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.plag-dash-highlight-text::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.plag-dash-highlight-text .hl-plag {
  background: rgba(239, 68, 68, 0.25);
  border-bottom: 2px solid #ef4444;
  padding: 0 2px;
  border-radius: 2px;
}
.plag-dash-highlight-text .hl-ai {
  background: rgba(249, 115, 22, 0.22);
  border-bottom: 2px solid #f97316;
  padding: 0 2px;
}
.plag-dash-highlight-text .hl-sus {
  background: rgba(234, 179, 8, 0.18);
  border-bottom: 2px solid #eab308;
  padding: 0 2px;
}

/* — AI panel — */
.plag-dash-ai-hero {
  text-align: center;
  padding: 8px 0 14px;
}
.plag-dash-ai-pct {
  font-size: 2rem;
  font-weight: 900;
  color: #fb923c;
}
.plag-dash-ai-sub {
  font-size: 0.72rem;
  color: var(--pd-muted);
}
.plag-dash-ai-bars { display: flex; flex-direction: column; gap: 10px; }
.plag-dash-ai-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  gap: 8px;
  align-items: center;
  font-size: 0.72rem;
}
.plag-dash-ai-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.plag-dash-ai-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
}
.plag-dash-ai-detail-btn {
  margin-top: 12px;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--pd-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

/* — footer — */
.plag-dash-footer,
.plag-dash--results .plag-dash-footer,
.plag-dash-footer-title,
.plag-dash-footer-grid {
  display: none !important;
}

.plag-dash-empty {
  color: var(--pd-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 24px 12px;
  line-height: 1.6;
}

.plag-dash-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 1100px) {
  .plag-dash-row--hero,
  .plag-dash-row--panels {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .plag-dash-row--hero,
  .plag-dash-row--panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .plag-dash { padding: calc(8px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .plag-dash-topbar { flex-direction: row; align-items: center; }
  .plag-dash-upgrade-btn { display: none; }
  .plag-dash-step-label { font-size: 0.55rem; }
  .plag-dash-stats-row { gap: 5px; }
  .plag-dash-stat-lbl { font-size: 0.58rem; }
}

/* —— بوابة نتائج الاستلال (مطابقة التصميم المرجعي) —— */
.plag-dash--results .plag-dash-brand-logo,
.plag-dash--results .plag-dash-topbar p,
.plag-dash--results #plagDashScanMeta {
  display: none !important;
}
.plag-dash--results .plag-dash-topbar {
  margin-bottom: 10px;
}
.plag-dash--results .plag-dash-topbar h1 {
  font-size: 1.05rem;
}
.plag-dash--results .plag-dash-new-scan-btn {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.4);
  font-size: 0.82rem;
  padding: 8px 16px;
}
.plag-portal {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1;
}
.plag-portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.plag-metric {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 28, 48, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
  text-align: right;
}
.plag-metric-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
}
.plag-metric-val {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}
.plag-metric--orig { border-color: rgba(45, 212, 191, 0.45); box-shadow: 0 0 18px rgba(20, 184, 166, 0.18); }
.plag-metric--orig .plag-metric-val { color: #5eead4; }
.plag-metric--plag { border-color: rgba(248, 113, 113, 0.5); box-shadow: 0 0 18px rgba(239, 68, 68, 0.16); }
.plag-metric--plag .plag-metric-val { color: #fb7185; }
.plag-metric--ai { border-color: rgba(251, 146, 60, 0.5); box-shadow: 0 0 18px rgba(249, 115, 22, 0.16); }
.plag-metric--ai .plag-metric-val { color: #fb923c; }
.plag-metric--src { border-color: rgba(148, 163, 184, 0.35); }
.plag-metric--src .plag-metric-val { color: #e2e8f0; }
.plag-portal-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(0, 1.75fr);
  gap: 14px;
  min-height: 0;
  flex: 1;
}
.plag-portal-editor-card,
.plag-portal-side-card {
  background: rgba(12, 22, 40, 0.86);
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 16px;
  overflow: hidden;
}
.plag-portal-editor-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  position: relative;
}
.plag-portal-card-head {
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 16, 32, 0.5);
}
.plag-portal-editor-body {
  flex: 1;
  min-height: 220px;
  overflow: auto;
  padding: 16px 18px 20px;
  line-height: 2;
  font-size: 0.95rem;
  color: #e2e8f0;
  -webkit-overflow-scrolling: touch;
}
.plag-portal-editor-body .plag-dash-mark {
  cursor: pointer;
  padding: 0 3px;
  border-radius: 4px;
}
.plag-page-break {
  display: block;
  margin: 18px 0 10px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  background: rgba(14, 116, 144, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
}
.plag-mark-pop {
  position: absolute;
  inset-inline-end: 16px;
  top: 58px;
  z-index: 4;
  width: min(280px, 86%);
  padding: 12px;
  border-radius: 14px;
  background: #12203a;
  border: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
.plag-mark-pop-meta {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.5;
}
.plag-mark-pop-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.plag-portal-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.plag-portal-side-tab {
  margin: 0;
  padding: 8px 14px 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: #93c5fd;
}
.plag-portal-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 14px;
  max-height: 360px;
  overflow: auto;
}
.plag-real-match {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #f1f5f9;
}
.plag-real-match-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: 6px;
}
.plag-real-match-top strong {
  color: #fb7185;
}
.plag-real-match-snip {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #e2e8f0;
  font-weight: 600;
}
.plag-real-match-src {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7dd3fc;
  text-decoration: none;
}
.plag-rewritten {
  background: rgba(45, 212, 191, 0.16);
  border-bottom: 2px solid #2dd4bf;
  color: #ccfbf1;
  border-radius: 3px;
}
.plag-portal-source {
  display: block;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #f1f5f9;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}
.plag-portal-source em {
  font-style: normal;
  color: #94a3b8;
  font-weight: 600;
}
.plag-portal-tools {
  padding-bottom: 14px;
}
.plag-portal-rephrase-all,
.plag-portal-pdf {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 0;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
}
.plag-portal-rephrase-all {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.32);
}
.plag-portal-pdf {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.plag-portal-extra { display: none !important; }

@media (max-width: 900px) {
  .plag-portal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plag-portal-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .plag-portal-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .plag-metric { padding: 10px 12px; }
  .plag-metric-val { font-size: 1.35rem; }
}
