.tpp-wrap,
.tpp-registration-wrap,
.tpp-admin-wrap {
  --tpp-bg: #f6f8fb;
  --tpp-panel: #ffffff;
  --tpp-text: #0f172a;
  --tpp-muted: #64748b;
  --tpp-border: #e2e8f0;
  --tpp-primary: #0b3a82;
  --tpp-primary-soft: #eaf2ff;
  --tpp-success: #15803d;
  --tpp-warning: #b45309;
  --tpp-danger: #b91c1c;
  --tpp-info: #2563eb;
  color: var(--tpp-text);
  direction: rtl;
}

.tpp-wrap *,.tpp-registration-wrap *,.tpp-admin-wrap * { box-sizing: border-box; }
.tpp-wrap a,.tpp-registration-wrap a,.tpp-admin-wrap a { text-decoration: none; }
.tpp-wrap h2,.tpp-wrap h3,.tpp-wrap h4,.tpp-registration-wrap h1,.tpp-registration-wrap h2 { margin: 0; color: var(--tpp-text); }
.tpp-wrap p,.tpp-registration-wrap p,.tpp-wrap span,.tpp-registration-wrap span { color: var(--tpp-muted); }

.tpp-wrap,
.tpp-registration-wrap { display: grid; gap: 18px; }
.tpp-wrap { padding: 6px 0; }
.tpp-registration-wrap { max-width: 760px; margin: 32px auto; padding: 0 16px; }

.tpp-panel,
.tpp-kpi-card,
.tpp-profile-card,
.tpp-course-card,
.tpp-picker-card,
.tpp-seat-card,
.tpp-course-progress-card,
.tpp-attempt-card,
.tpp-register-box {
  background: var(--tpp-panel);
  border: 1px solid var(--tpp-border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.tpp-panel,
.tpp-kpi-card,
.tpp-profile-card,
.tpp-picker-card,
.tpp-seat-card,
.tpp-register-box,
.tpp-course-card,
.tpp-course-progress-body,
.tpp-attempt-body { padding: 20px; }

.tpp-grid { display: grid; gap: 18px; }
.tpp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tpp-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tpp-card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tpp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.tpp-panel-head,
.tpp-actions-row,
.tpp-profile-top,
.tpp-profile-actions,
.tpp-course-footer,
.tpp-seat-card,
.tpp-simple-row,
.tpp-answer-row,
.tpp-course-progress-top,
.tpp-attempt-card summary,
.tpp-mini-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.tpp-panel-head { margin-bottom: 16px; }
.tpp-panel-head h3 { font-size: 20px; }
.tpp-panel-head a,.tpp-link { color: var(--tpp-primary); font-weight: 700; }

.tpp-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tpp-primary-soft);
  color: var(--tpp-primary) !important;
  font-size: 12px;
  font-weight: 800;
}

.tpp-panel-intro h2,
.tpp-register-head h1 { font-size: 30px; line-height: 1.2; margin-bottom: 8px; }
.tpp-panel-intro p,.tpp-register-head p { max-width: 720px; }

.tpp-kpi-card span { display: block; font-size: 13px; }
.tpp-kpi-card strong { display: block; margin-top: 8px; font-size: 30px; line-height: 1; color: var(--tpp-text); }

.tpp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--tpp-border);
  background: #fff;
  color: var(--tpp-text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.tpp-button.is-primary { background: var(--tpp-primary); border-color: var(--tpp-primary); color: #fff; }
.tpp-button.is-large { width: 100%; }
.tpp-button:hover { opacity: .96; }

.tpp-alert {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid;
  font-weight: 700;
}
.tpp-alert.is-success { background: rgba(21,128,61,.08); color: var(--tpp-success); border-color: rgba(21,128,61,.2); }
.tpp-alert.is-danger { background: rgba(185,28,28,.08); color: var(--tpp-danger); border-color: rgba(185,28,28,.2); }

.tpp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}
.tpp-badge.is-success { color: var(--tpp-success); background: rgba(21,128,61,.08); border-color: rgba(21,128,61,.18); }
.tpp-badge.is-warning { color: var(--tpp-warning); background: rgba(180,83,9,.08); border-color: rgba(180,83,9,.18); }
.tpp-badge.is-danger { color: var(--tpp-danger); background: rgba(185,28,28,.08); border-color: rgba(185,28,28,.18); }
.tpp-badge.is-info { color: var(--tpp-info); background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.18); }
.tpp-badge.is-neutral { color: #475569; background: #f8fafc; border-color: #e2e8f0; }

.tpp-form { display: grid; gap: 16px; }
.tpp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.tpp-form-grid.single-column { grid-template-columns: 1fr; }
.tpp-form label { display: block; margin-bottom: 8px; font-weight: 800; font-size: 13px; color: var(--tpp-text); }
.tpp-form input,
.tpp-form select,
.tpp-form textarea,
.tpp-admin-wrap textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--tpp-border);
  border-radius: 12px;
  padding: 11px 14px;
  background: #fff;
  color: var(--tpp-text);
  font-size: 14px;
  outline: none;
}
.tpp-form textarea { min-height: 110px; resize: vertical; }
.tpp-form input:focus,
.tpp-form select:focus,
.tpp-form textarea:focus { border-color: var(--tpp-primary); box-shadow: 0 0 0 4px rgba(11,58,130,.08); }

.tpp-profile-top h4,
.tpp-course-card h4,
.tpp-picker-card strong,
.tpp-course-progress-top strong,
.tpp-answer-row strong,
.tpp-simple-row strong { font-size: 17px; color: var(--tpp-text); }

.tpp-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tpp-primary-soft);
  color: var(--tpp-primary);
  font-weight: 800;
  font-size: 19px;
}

.tpp-profile-stats,
.tpp-course-inline-stats,
.tpp-steps,
.tpp-simple-list,
.tpp-seat-list,
.tpp-attempts-list,
.tpp-answer-list,
.tpp-course-progress-list { display: grid; gap: 12px; }

.tpp-profile-stats { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tpp-profile-stats div,
.tpp-course-inline-stats span,
.tpp-step {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.tpp-profile-stats span { display: block; font-size: 12px; }
.tpp-profile-stats strong { display: block; margin-top: 6px; font-size: 18px; }
.tpp-profile-actions { margin-top: 18px; }

.tpp-course-card { display: flex; flex-direction: column; }
.tpp-course-body { display: grid; gap: 14px; }
.tpp-course-footer strong { font-size: 18px; color: var(--tpp-text); }

.tpp-simple-row,
.tpp-seat-card,
.tpp-answer-row {
  padding: 14px 16px;
  border: 1px solid var(--tpp-border);
  border-radius: 14px;
  background: #fff;
}
.tpp-simple-row.is-stacked,
.tpp-seat-card { align-items: flex-start; }
.tpp-step strong {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tpp-primary);
  color: #fff;
  font-size: 13px;
  margin-left: 10px;
}

.tpp-seat-form { display: grid; gap: 10px; min-width: 260px; }

.tpp-picker-card {
  display: grid;
  gap: 6px;
  color: var(--tpp-text);
}

.tpp-progress-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 14px 0 18px;
}
.tpp-progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #0b3a82, #2563eb);
  border-radius: 999px;
}

.tpp-course-progress-card,
.tpp-attempt-card { overflow: hidden; }
.tpp-course-progress-card summary,
.tpp-attempt-card summary {
  list-style: none;
  padding: 18px 20px;
  cursor: pointer;
}
.tpp-course-progress-card summary::-webkit-details-marker,
.tpp-attempt-card summary::-webkit-details-marker { display: none; }
.tpp-course-progress-body,
.tpp-attempt-body { border-top: 1px solid var(--tpp-border); }

.tpp-table-wrap { overflow: auto; }
.tpp-table { width: 100%; border-collapse: collapse; }
.tpp-table th,
.tpp-table td {
  text-align: right;
  padding: 14px 12px;
  border-bottom: 1px solid var(--tpp-border);
  vertical-align: top;
}
.tpp-table th { font-size: 13px; color: var(--tpp-text); }
.tpp-table td span { display: block; margin-top: 4px; }

.tpp-empty-state,
.tpp-empty-inline {
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.tpp-empty-state.small { padding: 12px 14px; }

.tpp-register-box { max-width: 100%; }
.tpp-register-head { margin-bottom: 18px; }

@media (max-width: 1100px) {
  .tpp-kpis,
  .tpp-card-grid,
  .tpp-card-grid-2,
  .tpp-grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .tpp-kpis,
  .tpp-card-grid,
  .tpp-card-grid-2,
  .tpp-grid-2,
  .tpp-form-grid,
  .tpp-profile-stats { grid-template-columns: 1fr; }

  .tpp-panel-head,
  .tpp-actions-row,
  .tpp-profile-top,
  .tpp-profile-actions,
  .tpp-course-footer,
  .tpp-seat-card,
  .tpp-simple-row,
  .tpp-attempt-card summary,
  .tpp-course-progress-top { flex-direction: column; align-items: stretch; }

  .tpp-seat-form { min-width: 100%; }
  .tpp-panel-intro h2,
  .tpp-register-head h1 { font-size: 24px; }
}


.tpp-muted { color: var(--tpp-muted); font-size: 14px; margin-top: 6px; }
.tpp-child-password-fields { display: grid; }
.tpp-filters-form { display: grid; gap: 14px; }
.tpp-filters-grid { display: grid; grid-template-columns: 1.3fr .9fr auto; gap: 14px; align-items: end; }
.tpp-filters-actions { display: flex; gap: 10px; align-items: end; }
.tpp-filter-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.tpp-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--tpp-border);
  color: var(--tpp-text) !important;
  font-size: 13px;
  font-weight: 700;
}
.tpp-chip.is-active { background: var(--tpp-primary-soft); border-color: rgba(11,58,130,.18); color: var(--tpp-primary) !important; }
.tpp-course-card-buy .tpp-course-headline { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.tpp-course-card-buy .tpp-course-inline-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
.tpp-course-card-buy .tpp-course-footer { margin-top: 4px; }
.tpp-seat-list-compact { gap: 14px; }
.tpp-seat-card-vertical { display:grid; gap:14px; }
.tpp-seat-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.tpp-seat-card-top strong { display:block; font-size:18px; }
.tpp-seat-card-top span { display:block; margin-top:6px; }
.tpp-seat-form-wide { min-width: 100%; grid-template-columns: 1fr auto; align-items: center; }
.tpp-assignment-grid { display:grid; gap:14px; }
.tpp-assignment-card {
  display:grid;
  grid-template-columns: 110px 1fr auto;
  gap:18px;
  padding:16px;
  border:1px solid var(--tpp-border);
  border-radius:16px;
  background:#fff;
  align-items:center;
}
.tpp-assignment-date {
  display:grid;
  gap:4px;
  justify-items:center;
  text-align:center;
  padding:12px 8px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.tpp-assignment-date span,
.tpp-assignment-date small { color: var(--tpp-muted) !important; }
.tpp-assignment-date strong { font-size: 28px; line-height:1; }
.tpp-assignment-content { display:grid; gap:5px; }
.tpp-assignment-content strong { font-size: 18px; color: var(--tpp-text); }
.tpp-assignment-content span { color: var(--tpp-text) !important; font-weight:700; }
.tpp-assignment-status { display:flex; align-items:center; justify-content:flex-end; }

.tutor-dashboard-permalinks li.tpp-nav-child-item > a {
  padding-right: 34px !important;
  font-size: 14px !important;
  opacity: .95;
  position: relative;
}
.tutor-dashboard-permalinks li.tpp-nav-child-item > a:before {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 999px;
  background: rgba(37,99,235,.35);
}
.tutor-dashboard-permalinks li.tpp-nav-parent-root + li.tpp-nav-child-item > a { margin-top: 4px; }

@media (max-width: 1024px) {
  .tpp-assignment-card { grid-template-columns: 1fr; }
  .tpp-assignment-status { justify-content: flex-start; }
  .tpp-seat-form-wide { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .tpp-filters-grid,
  .tpp-course-card-buy .tpp-course-inline-stats,
  .tpp-seat-card-top { grid-template-columns: 1fr; display:grid; }
  .tpp-filters-actions { flex-direction: column; }
}

.tpp-button.is-danger { background: #fff5f5; border-color: rgba(185,28,28,.22); color: #b91c1c; }
.tpp-button.is-danger:hover { background: #fee2e2; }
.tpp-inline-form { display: inline; }
.tpp-profile-actions-stack { flex-wrap: wrap; }
.tpp-course-admin-strip { margin: 0 0 18px; padding: 14px; border: 1px dashed #fecaca; background: #fff7f7; border-radius: 14px; }
.tpp-admin-wrap .tpp-panel { max-width: none; }
