/* ═══════════════════════════════════════════════════════════
   DISC Test Plugin v3 — Frontend CSS
   Vazir font + full redesign
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --d-col: #C0392B;
  --i-col: #E67E22;
  --s-col: #27AE60;
  --c-col: #2980B9;
  --primary: #3D5A99;
  --bg: #F4F6FB;
  --card: #FFFFFF;
  --border: #DDE3EF;
  --text: #1E293B;
  --muted: #64748B;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(61,90,153,.10);
}

* { box-sizing: border-box; }

.disc-wrapper {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
  direction: rtl;
  max-width: 780px;
  margin: 0 auto;
  color: var(--text);
  padding: 16px;
}

/* ── Notice ── */
.disc-notice {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.7;
}
.disc-notice-warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}
.disc-notice a { color: var(--primary); font-weight: 600; }

/* ── Progress bar ── */
.disc-progress-wrap {
  position: relative;
  background: var(--border);
  border-radius: 50px;
  height: 10px;
  margin-bottom: 28px;
  overflow: visible;
}
.disc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--c-col), var(--primary));
  border-radius: 50px;
  width: 0%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.disc-progress-text {
  position: absolute;
  left: 0; right: 0;
  top: -22px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ── Card ── */
.disc-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: discFadeUp .3s ease;
}
@keyframes discFadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

.disc-card-header {
  background: linear-gradient(135deg, #3D5A99 0%, #2C3E6B 100%);
  color: #fff;
  padding: 26px 28px 20px;
  text-align: center;
}
.disc-card-header h2 {
  margin: 8px 0 6px;
  font-size: 20px;
  font-weight: 800;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.disc-card-header p {
  margin: 0;
  opacity: .8;
  font-size: 13px;
}
.disc-card-body { padding: 26px; }

/* ── DISC logo letters ── */
.disc-logo-bar {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 6px;
  margin-bottom: 6px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: ltr;
  unicode-bidi: bidi-override;
}
.disc-d { color: var(--d-col); }
.disc-i { color: var(--i-col); }
.disc-s { color: var(--s-col); }
.disc-c { color: var(--c-col); }

/* ── Fields ── */
.disc-field { margin-bottom: 16px; }
.disc-field label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text);
}
.disc-field input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  color: var(--text);
  transition: border-color .2s;
  background: #fff;
}
.disc-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,90,153,.12);
}
.disc-input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

/* ── Instructions ── */
.disc-instructions {
  background: var(--bg);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-right: 4px solid var(--primary);
}
.disc-instructions h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.disc-instructions ul {
  margin: 0;
  padding-right: 18px;
}
.disc-instructions li {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.8;
}

/* ── Buttons ── */
.disc-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  text-align: center;
}
.disc-btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}
.disc-btn-primary:hover { background: #2C3E6B; }
.disc-btn-primary:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
}
.disc-btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.disc-btn-secondary:hover { background: var(--bg); }
.disc-btn-report {
  background: var(--primary);
  color: #fff;
  width: 100%;
  margin-bottom: 10px;
}
.disc-btn-report:hover { background: #2C3E6B; }
.disc-btn-result-page {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  width: 100%;
}

/* ── Question badge ── */
.disc-q-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  margin-bottom: 10px;
}

/* ── Choice rows ── */
.disc-choice-labels {
  display: flex;
  align-items: center;
  padding: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px dashed var(--border);
  margin-bottom: 4px;
}
.disc-label-most  { width: 44px; text-align: center; color: var(--s-col); }
.disc-label-word  { flex: 1; text-align: center; }
.disc-label-least { width: 44px; text-align: center; color: var(--d-col); }

.disc-choice-row {
  display: flex;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid #f1f5f9;
  transition: background .12s;
  border-radius: 6px;
}
.disc-choice-row:last-of-type { border-bottom: none; }
.disc-choice-row.selected-most  { background: rgba(39,174,96,.07); }
.disc-choice-row.selected-least { background: rgba(192,57,43,.07); }

.disc-option-text {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  padding: 0 8px;
}

.disc-pick-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
  color: #fff;
}
.disc-pick-btn .check-icon { opacity: 0; transition: opacity .15s; font-size: 14px; }
.disc-pick-btn.most-btn.active  { background: var(--s-col); border-color: var(--s-col); }
.disc-pick-btn.most-btn.active .check-icon  { opacity: 1; }
.disc-pick-btn.least-btn.active { background: var(--d-col); border-color: var(--d-col); }
.disc-pick-btn.least-btn.active .check-icon { opacity: 1; }
.disc-pick-btn:hover:not(.active) { border-color: var(--primary); }

/* ── Row error animation ── */
@keyframes discShake {
  0%,100% { transform:translateX(0); }
  20%     { transform:translateX(-5px); }
  40%     { transform:translateX(5px); }
  60%     { transform:translateX(-3px); }
  80%     { transform:translateX(3px); }
}
.disc-row-error { animation: discShake .4s ease; background: rgba(239,68,68,.06) !important; }

/* ── Navigation ── */
.disc-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.disc-nav .disc-btn { flex: 1; }

/* ── Error message ── */
.disc-q-error {
  margin-top: 10px;
  color: #b91c1c;
  font-size: 12px;
  padding: 8px 12px;
  background: #fef2f2;
  border-radius: 6px;
  border-right: 3px solid #ef4444;
}

/* ── Loading ── */
.disc-loading-card {
  padding: 60px;
  text-align: center;
}
.disc-spinner {
  width: 52px;
  height: 52px;
  border: 5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: discSpin .7s linear infinite;
  margin: 0 auto 22px;
}
@keyframes discSpin { to { transform:rotate(360deg); } }

/* ── Done / Success ── */
.disc-success-header {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
}
.disc-check-circle {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.disc-result-pattern {
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 18px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.disc-done-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ── Done score bars ── */
.done-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.done-bar-dim { width:18px; font-size:16px; font-weight:900; flex-shrink:0; font-family:'Vazirmatn',Tahoma,sans-serif; }
.done-bar-track { flex:1; height:14px; background:var(--bg); border-radius:50px; overflow:hidden; }
.done-bar-fill { height:100%; border-radius:50px; transition:width .9s cubic-bezier(.4,0,.2,1); }
.done-bar-val { width:38px; font-size:12px; font-weight:700; text-align:left; color:var(--muted); }

/* ═══════════════════════════════════════════════════════════
   REPORT VIEW  (result-page.php)
═══════════════════════════════════════════════════════════ */
.disc-report-view { max-width:900px; font-family:'Vazirmatn',Tahoma,sans-serif; }

.disc-report-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.disc-report-logo { font-size:40px; font-weight:900; letter-spacing:4px; flex-shrink:0; font-family:'Vazirmatn',Tahoma,sans-serif; direction:ltr; unicode-bidi:bidi-override; }
.disc-report-meta { flex:1; }
.disc-report-meta h1 { margin:0 0 10px; font-size:18px; font-weight:800; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-report-meta table td { padding:3px 10px; font-size:13px; }
.disc-report-meta table td:first-child { color:var(--muted); }
.disc-dl-btn {
  display: inline-flex; align-items:center; gap:6px;
  background: var(--primary); color: #fff;
  padding: 9px 18px; border-radius:8px;
  text-decoration: none; font-size:13px; font-weight:700;
  font-family: 'Vazirmatn',Tahoma,sans-serif;
  white-space: nowrap;
  cursor: pointer; border: none;
}
.disc-dl-btn:hover { background:#2C3E6B; color:#fff; }

.disc-report-section {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden;
}
.disc-ch-title {
  color: #fff; padding: 13px 22px;
  font-size: 15px; font-weight: 700; margin: 0;
  font-family: 'Vazirmatn',Tahoma,sans-serif;
}
.disc-report-section > *:not(.disc-ch-title) { padding: 0 22px; }
.disc-report-section > h3 { padding:14px 22px 0; font-size:14px; color:var(--primary); font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-report-section > p, .disc-report-section > ul { padding:8px 22px; }

/* Gauges grid */
.disc-gauges-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 14px; padding: 18px 22px !important;
}
.disc-gauge-card {
  text-align: center; border:1px solid var(--border);
  border-radius:10px; padding:12px 6px; background:#fafbff;
}
.disc-gauge-letter { font-size:28px; font-weight:900; margin-bottom:2px; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-gauge-svg { width:100%; max-width:108px; display:block; margin:0 auto; }
.disc-gauge-val { font-size:19px; font-weight:900; margin-top:4px; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-seg-badge { font-size:10px; color:var(--muted); margin-top:2px; }

/* Bar charts */
.disc-charts-row {
  display: grid; grid-template-columns:1fr 1fr; gap:18px;
  padding: 0 22px 18px !important;
}
.disc-chart-box h4 { margin:0 0 10px; font-size:12px; color:var(--muted); font-weight:700; }
.disc-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.disc-bar-label { width:18px; font-weight:900; font-size:14px; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-bar-track { flex:1; height:13px; background:var(--bg); border-radius:50px; overflow:hidden; }
.disc-bar-fill { height:100%; border-radius:50px; transition:width .6s ease; }
.disc-bar-num { width:32px; text-align:left; font-size:12px; font-weight:700; color:var(--muted); }

/* Tendency table */
.disc-tendency-table { width:100%; border-collapse:collapse; font-size:12px; }
.disc-tendency-table th { background:var(--bg); padding:9px 12px; text-align:right; font-size:12px; color:var(--muted); font-weight:700; border-bottom:2px solid var(--border); font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-tendency-table td { padding:8px 12px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.disc-tendency-table tr:last-child td { border-bottom:none; }
.disc-tendency-table tr:nth-child(even) td { background:#fafbfd; }
.disc-mini-track { display:inline-block; width:80px; height:8px; background:var(--bg); border-radius:50px; vertical-align:middle; margin-left:8px; overflow:hidden; }
.disc-mini-fill  { height:100%; border-radius:50px; display:block; }
.disc-level-badge { display:inline-block; color:#fff; padding:2px 9px; border-radius:12px; font-size:10px; font-weight:700; font-family:'Vazirmatn',Tahoma,sans-serif; }

/* Desc grid */
.disc-desc-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:16px 22px !important; }
.disc-desc-block { background:var(--bg); border-radius:8px; padding:14px; }
.disc-desc-block h3 { margin:0 0 8px; font-size:13px; color:var(--primary); font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-desc-block p { margin:0; font-size:13px; line-height:1.9; }

/* Strengths / Challenges */
.disc-strengths-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:0 22px 18px !important; }
.disc-sq-box { border-radius:8px; padding:14px 16px; }
.disc-strengths { background:rgba(22,163,74,.07); border:1px solid rgba(22,163,74,.25); }
.disc-challenges { background:rgba(220,38,38,.07); border:1px solid rgba(220,38,38,.25); }
.disc-sq-box h3 { margin:0 0 10px; font-size:13px; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-strengths h3 { color:#15803d; }
.disc-challenges h3 { color:#b91c1c; }
.disc-sq-box ul { margin:0; padding-right:18px; }
.disc-sq-box li { margin-bottom:5px; font-size:13px; }

/* Chips */
.disc-keys-row { display:flex; flex-wrap:wrap; gap:8px; padding:8px 22px 14px !important; }
.disc-key-chip { border:1.5px solid; border-radius:20px; padding:5px 14px; font-size:12px; font-weight:700; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-train-chip { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; border-radius:20px; padding:5px 14px; font-size:12px; font-weight:600; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-recs { padding:0 22px 14px !important; padding-right:36px !important; }
.disc-recs li { margin-bottom:7px; font-size:13px; line-height:1.9; }

/* Jobs grid */
.disc-jobs-grid { display:flex; flex-wrap:wrap; gap:8px; padding:14px 22px !important; }
.disc-job-chip { border:1.5px solid; border-radius:20px; padding:6px 16px; font-size:12px; font-weight:500; font-family:'Vazirmatn',Tahoma,sans-serif; }

/* Dashboard */
.disc-dashboard h2 { margin-bottom:16px; font-size:20px; font-weight:800; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-empty { text-align:center; padding:50px; background:#fff; border-radius:var(--radius); }
.disc-dash-table { width:100%; border-collapse:collapse; background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.disc-dash-table th { background:var(--primary); color:#fff; padding:11px 14px; font-size:13px; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-dash-table td { padding:10px 14px; border-bottom:1px solid var(--border); font-size:13px; }
.disc-dash-table tr:last-child td { border-bottom:none; }
.disc-btn-sm { display:inline-block; padding:4px 12px; background:var(--primary); color:#fff; border-radius:6px; font-size:11px; text-decoration:none; margin-left:4px; font-family:'Vazirmatn',Tahoma,sans-serif; }
.disc-btn-sm-outline { background:transparent; color:var(--primary); border:1px solid var(--primary); }

/* Responsive */
@media(max-width:600px){
  .disc-gauges-grid { grid-template-columns:repeat(2,1fr); }
  .disc-charts-row  { grid-template-columns:1fr; }
  .disc-desc-grid   { grid-template-columns:1fr; }
  .disc-strengths-row { grid-template-columns:1fr; }
  .disc-report-header { flex-direction:column; text-align:center; }
  .disc-option-text { font-size:12px; }
}

/* ── Required star / optional tag ── */
.req-star { color: #ef4444; margin-right: 2px; }
.opt-tag  { color: #94a3b8; font-size: 11px; font-weight: 400; margin-right: 4px; }

/* ── Personal message ── */
.disc-personal-msg {
  background: linear-gradient(135deg,#eff6ff,#f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.9;
  color: #1e40af;
  border-right: 4px solid #3b82f6;
}

/* ── DISC logo letters MUST be LTR ── */
.disc-logo-bar,
.disc-report-logo,
.disc-logo-bar *,
.disc-report-logo * {
  direction: ltr !important;
  unicode-bidi: bidi-override !important;
}

/* Front-end consultant results shortcode: [disc_consultant_results] */
.disc-front-results {
  direction: rtl;
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .07);
  color: #0f172a;
}

.disc-modern-results * {
  box-sizing: border-box;
}

.disc-front-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.disc-front-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  background: #eef6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.8;
  font-weight: 800;
  margin-bottom: 8px;
}

.disc-front-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.5;
  font-weight: 900;
  letter-spacing: -.3px;
  color: #0f172a;
}

.disc-front-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.disc-front-count {
  min-width: 92px;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: #fff;
  padding: 12px 14px;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}

.disc-front-count strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.disc-front-count span {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 4px;
  font-weight: 700;
}

.disc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.disc-results-front-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  background: #fff;
}

.disc-results-front-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.8;
  font-weight: 900;
  padding: 14px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  text-align: right;
}

.disc-results-front-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

.disc-results-front-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.disc-results-front-table tbody tr:hover td {
  background: #f1f5f9;
}

.disc-results-front-table tbody tr:last-child td {
  border-bottom: 0;
}

.disc-id-cell {
  width: 62px;
  color: #64748b !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.disc-name-cell {
  min-width: 190px;
  white-space: nowrap;
}

.disc-name-cell strong {
  color: #0f172a;
  font-weight: 900;
}

.disc-email-cell {
  min-width: 255px;
  direction: ltr;
  text-align: left !important;
  white-space: nowrap;
  word-break: normal !important;
  overflow-wrap: normal !important;
  color: #334155 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px !important;
}

.disc-code-cell {
  direction: ltr;
  text-align: center !important;
  white-space: nowrap;
  min-width: 74px;
  color: #475569 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8fafc !important;
  font-weight: 900 !important;
}

.disc-phone-cell {
  direction: ltr;
  text-align: left !important;
  min-width: 155px;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #334155 !important;
}

.disc-date-cell {
  direction: ltr;
  text-align: left !important;
  min-width: 142px;
  white-space: nowrap;
  color: #64748b !important;
  font-size: 12px !important;
}

.disc-pattern-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  color: #fff;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--disc-pattern-color, #475569) 28%, transparent);
}

.disc-results-front-table .score-d,
.disc-results-front-table .score-i,
.disc-results-front-table .score-s,
.disc-results-front-table .score-c {
  min-width: 48px;
  text-align: center !important;
  font-size: 15px;
  font-weight: 950;
}

.disc-results-front-table .score-d { color: #DC2626 !important; }
.disc-results-front-table .score-i { color: #F97316 !important; }
.disc-results-front-table .score-s { color: #16A34A !important; }
.disc-results-front-table .score-c { color: #2563EB !important; }

.disc-actions-cell {
  min-width: 250px;
  white-space: nowrap;
}

.disc-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
}

.disc-action-btn,
button.disc-action-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  line-height: 1.4;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.disc-action-btn:hover,
button.disc-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

.disc-action-btn.primary {
  background: #0f172a;
}

.disc-action-btn.light,
button.disc-action-btn.light {
  background: #fff;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
}

.disc-action-btn.note,
button.disc-action-btn.note {
  background: #fff7ed;
  color: #9a3412 !important;
  border: 1px solid #fed7aa;
}

.disc-note-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
}

.disc-empty-box {
  background: #f8fafc;
  color: #64748b;
  border-radius: 16px;
  padding: 36px;
  text-align: center;
  font-weight: 800;
  border: 1px dashed #cbd5e1;
}

.disc-muted {
  color: #94a3b8;
}

.disc-note-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  direction: rtl;
  font-family: Vazirmatn, Tahoma, sans-serif;
}

.disc-note-modal.is-open {
  display: block;
}

.disc-note-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}

.disc-note-modal-box {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  margin: 9vh auto 0;
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  border: 1px solid rgba(226, 232, 240, .9);
}

.disc-note-modal-close {
  position: absolute;
  left: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.disc-note-modal-box h3 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.disc-note-person {
  margin: 6px 0 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

#disc-front-note-text {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px;
  outline: none;
  color: #0f172a;
  background: #f8fafc;
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 14px;
  line-height: 2;
}

#disc-front-note-text:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
  background: #fff;
}

.disc-note-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.disc-note-message {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.disc-note-message.is-success {
  display: block;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.disc-note-message.is-error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@media (max-width: 767px) {
  .disc-front-results {
    padding: 16px;
    border-radius: 18px;
  }

  .disc-front-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .disc-front-head h2 {
    font-size: 21px;
  }

  .disc-front-count {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 8px;
  }

  .disc-note-modal-box {
    margin-top: 5vh;
    padding: 18px;
    border-radius: 20px;
  }
}

/* v4.4.3: fit consultant results table without horizontal scroll on desktop */
@media (min-width: 900px) {
  .disc-table-wrap {
    overflow-x: hidden !important;
  }
  .disc-results-front-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }
  .disc-results-front-table th,
  .disc-results-front-table td {
    padding: 12px 9px !important;
  }
  .disc-results-front-table th:nth-child(1),
  .disc-results-front-table td:nth-child(1) { width: 48px; }
  .disc-results-front-table th:nth-child(2),
  .disc-results-front-table td:nth-child(2) { width: 165px; }
  .disc-results-front-table th:nth-child(3),
  .disc-results-front-table td:nth-child(3) { width: 230px; }
  .disc-results-front-table th:nth-child(4),
  .disc-results-front-table td:nth-child(4) { width: 92px; text-align:center !important; }
  .disc-results-front-table th:nth-child(5),
  .disc-results-front-table td:nth-child(5) { width: 70px; }
  .disc-results-front-table th:nth-child(6),
  .disc-results-front-table td:nth-child(6),
  .disc-results-front-table th:nth-child(7),
  .disc-results-front-table td:nth-child(7),
  .disc-results-front-table th:nth-child(8),
  .disc-results-front-table td:nth-child(8),
  .disc-results-front-table th:nth-child(9),
  .disc-results-front-table td:nth-child(9) { width: 46px; }
  .disc-results-front-table th:nth-child(10),
  .disc-results-front-table td:nth-child(10) { width: 170px; }
  .disc-results-front-table th:nth-child(11),
  .disc-results-front-table td:nth-child(11) { width: 126px; }
  .disc-results-front-table th:nth-child(12),
  .disc-results-front-table td:nth-child(12) { width: 190px; }
}

.disc-phone-cell {
  min-width: 0 !important;
  white-space: normal !important;
  line-height: 1.75 !important;
  overflow-wrap: anywhere !important;
}
.disc-phone-cell span {
  display: block;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
}
.disc-email-cell {
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
.disc-name-cell {
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
.disc-actions-cell {
  min-width: 0 !important;
}
.disc-actions-group {
  width: 100%;
  justify-content: flex-start;
  gap: 6px !important;
}
.disc-action-btn,
button.disc-action-btn {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 11px !important;
}

@media (max-width: 899px) {
  .disc-table-wrap { overflow-x: auto !important; }
  .disc-results-front-table { min-width: 980px !important; table-layout: auto !important; }
}

/* v4.4.3: consultant note in result page */
.disc-consultant-note-section {
  margin-top: 24px;
}
.disc-consultant-note-card {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fed7aa;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 35px rgba(154, 52, 18, .08);
}
.disc-consultant-note-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.disc-consultant-note-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ffedd5;
  border: 1px solid #fed7aa;
  font-size: 22px;
}
.disc-consultant-note-head h3 {
  margin: 0;
  color: #9a3412;
  font-size: 18px;
  font-weight: 900;
}
.disc-consultant-note-head p {
  margin: 3px 0 0;
  color: #9a3412;
  opacity: .75;
  font-size: 13px;
  font-weight: 700;
}
.disc-consultant-note-body {
  background: #fff;
  color: #1e293b;
  border: 1px solid #ffedd5;
  border-radius: 16px;
  padding: 18px;
  font-size: 15px;
  line-height: 2.15;
  font-weight: 600;
  white-space: normal;
}


/* v4.4.4: keep consultant table fully inside the card and keep note badges visible */
.disc-table-wrap {
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

.disc-results-front-table {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

.disc-results-front-table th,
.disc-results-front-table td {
  overflow: hidden;
}

.disc-results-front-table th:nth-child(1),
.disc-results-front-table td:nth-child(1) { width: 44px !important; }
.disc-results-front-table th:nth-child(2),
.disc-results-front-table td:nth-child(2) { width: 178px !important; }
.disc-results-front-table th:nth-child(3),
.disc-results-front-table td:nth-child(3) { width: 230px !important; }
.disc-results-front-table th:nth-child(4),
.disc-results-front-table td:nth-child(4) { width: 86px !important; text-align: center !important; }
.disc-results-front-table th:nth-child(5),
.disc-results-front-table td:nth-child(5) { width: 62px !important; }
.disc-results-front-table th:nth-child(6),
.disc-results-front-table td:nth-child(6),
.disc-results-front-table th:nth-child(7),
.disc-results-front-table td:nth-child(7),
.disc-results-front-table th:nth-child(8),
.disc-results-front-table td:nth-child(8),
.disc-results-front-table th:nth-child(9),
.disc-results-front-table td:nth-child(9) { width: 42px !important; }
.disc-results-front-table th:nth-child(10),
.disc-results-front-table td:nth-child(10) { width: 148px !important; }
.disc-results-front-table th:nth-child(11),
.disc-results-front-table td:nth-child(11) { width: 124px !important; }
.disc-results-front-table th:nth-child(12),
.disc-results-front-table td:nth-child(12) { width: 184px !important; }

.disc-name-cell {
  white-space: normal !important;
}

.disc-name-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.disc-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-weight: 900;
}

.disc-note-badge {
  flex: 0 0 auto;
  margin-right: 0 !important;
  padding: 2px 7px !important;
  font-size: 10.5px !important;
}

.disc-email-cell,
.disc-date-cell {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.disc-phone-cell {
  white-space: normal !important;
  overflow-wrap: normal !important;
}

.disc-phone-cell span {
  display: block;
  line-height: 1.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disc-actions-cell {
  overflow: visible !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.disc-actions-group {
  display: grid !important;
  grid-template-columns: minmax(58px, 74px) minmax(74px, 1fr);
  gap: 7px !important;
  align-items: center;
  justify-content: stretch !important;
  width: 100%;
  max-width: 100%;
}

.disc-actions-group .disc-action-btn {
  width: 100%;
  min-width: 0 !important;
  padding: 7px 8px !important;
  font-size: 11.5px !important;
  white-space: nowrap;
}

.disc-actions-group .disc-front-note-btn.has-note {
  background: #fff7ed;
  border-color: #fdba74;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, .12);
}

@media (max-width: 1199px) {
  .disc-front-results { padding: 18px !important; }
  .disc-results-front-table th,
  .disc-results-front-table td { padding: 11px 7px !important; }
  .disc-results-front-table th:nth-child(2),
  .disc-results-front-table td:nth-child(2) { width: 160px !important; }
  .disc-results-front-table th:nth-child(3),
  .disc-results-front-table td:nth-child(3) { width: 210px !important; }
  .disc-results-front-table th:nth-child(10),
  .disc-results-front-table td:nth-child(10) { width: 138px !important; }
  .disc-results-front-table th:nth-child(12),
  .disc-results-front-table td:nth-child(12) { width: 176px !important; }
}

@media (max-width: 899px) {
  .disc-table-wrap { overflow-x: auto !important; }
  .disc-results-front-table { min-width: 980px !important; table-layout: auto !important; }
}


/* v4.4.5: column visibility controls for consultant table */
.disc-column-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.disc-column-controls > span {
  color: #0f172a;
  margin-left: 4px;
  font-weight: 900;
}
.disc-column-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe3ef;
  cursor: pointer;
  user-select: none;
}
.disc-column-controls input {
  width: 14px;
  height: 14px;
  accent-color: #0f172a;
}
.disc-col-preset {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.disc-col-preset[data-preset="compact"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.disc-results-front-table.is-hide-email th:nth-child(3),
.disc-results-front-table.is-hide-email td:nth-child(3),
.disc-results-front-table.is-hide-code th:nth-child(5),
.disc-results-front-table.is-hide-code td:nth-child(5),
.disc-results-front-table.is-hide-scores th:nth-child(6),
.disc-results-front-table.is-hide-scores td:nth-child(6),
.disc-results-front-table.is-hide-scores th:nth-child(7),
.disc-results-front-table.is-hide-scores td:nth-child(7),
.disc-results-front-table.is-hide-scores th:nth-child(8),
.disc-results-front-table.is-hide-scores td:nth-child(8),
.disc-results-front-table.is-hide-scores th:nth-child(9),
.disc-results-front-table.is-hide-scores td:nth-child(9),
.disc-results-front-table.is-hide-phone th:nth-child(10),
.disc-results-front-table.is-hide-phone td:nth-child(10),
.disc-results-front-table.is-hide-date th:nth-child(11),
.disc-results-front-table.is-hide-date td:nth-child(11) {
  display: none !important;
}
.disc-results-front-table.is-hide-email,
.disc-results-front-table.is-hide-code,
.disc-results-front-table.is-hide-scores,
.disc-results-front-table.is-hide-phone,
.disc-results-front-table.is-hide-date {
  table-layout: auto !important;
}
.disc-results-front-table.is-hide-email .disc-actions-group,
.disc-results-front-table.is-hide-date .disc-actions-group,
.disc-results-front-table.is-hide-phone .disc-actions-group {
  grid-template-columns: minmax(60px, 78px) minmax(82px, 1fr);
}
@media (max-width: 1199px) {
  .disc-column-controls {
    gap: 6px;
    padding: 9px;
  }
  .disc-column-controls > span {
    width: 100%;
  }
  .disc-column-controls label,
  .disc-col-preset {
    padding: 6px 9px;
    font-size: 11.5px;
  }
}
@media (max-width: 899px) {
  .disc-table-wrap { overflow-x: hidden !important; }
  .disc-results-front-table { min-width: 0 !important; width: 100% !important; table-layout: fixed !important; }
  .disc-results-front-table:not(.is-hide-email):not(.is-hide-date):not(.is-hide-scores) {
    min-width: 900px !important;
    table-layout: auto !important;
  }
}
