/* ═══════════════════════════════════════════════════════
   منصة فعاليات التطوير المهني – نظام التصميم الموحّد
   trainer-ui.css  |  RTL  |  Bootstrap 5 RTL
═══════════════════════════════════════════════════════ */

/* ── متغيرات الألوان ── */
:root {
  --primary:       #2563eb;
  --primary-dark:  #1e40af;
  --primary-light: #eff6ff;
  --success:       #16a34a;
  --success-light: #f0fdf4;
  --warning:       #f59e0b;
  --warning-light: #fffbeb;
  --danger:        #dc2626;
  --danger-light:  #fef2f2;
  --info:          #0891b2;
  --info-light:    #ecfeff;
  --dark:          #0f172a;
  --muted:         #64748b;
  --bg:            #f1f5f9;
  --card:          #ffffff;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --radius-sm:     8px;
  --radius:        16px;
  --radius-lg:     18px;
  --shadow-sm:     0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow:        0 4px 16px rgba(15,23,42,.08);
  --shadow-lg:     0 10px 40px rgba(15,23,42,.12);
  --transition:    .18s ease;
}

/* ── خط عربي ── */
body {
  font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════
   App Shell
══════════════════════════════════════════════════════ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-main  { flex: 1; }

/* ══════════════════════════════════════════════════════
   App Header (Navbar)
══════════════════════════════════════════════════════ */
.app-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 2px solid rgba(255,255,255,.06);
  padding: .6rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(15,23,42,.25);
}
.app-topbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 2px solid rgba(255,255,255,.06);
  box-shadow: 0 2px 12px rgba(15,23,42,.25);
}
.app-header .brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.015em;
}
.app-header .brand-sub {
  font-size: .7rem;
  color: rgba(255,255,255,.45);
}
.app-header .nav-link-top {
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  padding: .3rem .7rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.app-header .nav-link-top:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.app-header .btn-logout {
  font-size: .8rem;
  padding: .3rem .9rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
  background: transparent;
  transition: all var(--transition);
}
.app-header .btn-logout:hover {
  background: rgba(220,38,38,.7);
  border-color: rgba(220,38,38,.5);
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   Page Hero
══════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 1.6rem 1.5rem 1.4rem;
  color: #fff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: visible;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(37,99,235,.25) 0%, transparent 70%);
  pointer-events: none;
}
.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  line-height: 1.4;
}
.page-subtitle {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  margin-top: .2rem;
}
.page-hero .badge {
  font-size: .72rem;
  font-weight: 500;
  padding: .25em .65em;
}

/* ══════════════════════════════════════════════════════
   Action Bar
══════════════════════════════════════════════════════ */
.action-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════════════════
   Cards
══════════════════════════════════════════════════════ */
.soft-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  transition: box-shadow var(--transition);
}
.soft-card:hover {
  box-shadow: var(--shadow);
}
.info-card,
.section-card,
.form-shell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-card,
.section-card {
  overflow: visible;
}
.info-card .card-header-custom,
.section-card .card-header-custom {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.25rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.info-card .card-body-custom,
.section-card .card-body-custom {
  padding: 1.25rem;
}

.form-shell {
  padding: 1.35rem;
}

.form-section {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 1rem 1rem .9rem;
  background: #fcfdff;
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card .stat-icon {
  font-size: 1.6rem;
  margin-bottom: .4rem;
  display: block;
}
.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .2rem;
}
.stat-card .stat-label {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
}
.stat-card.stat-primary  { border-top: 3px solid var(--primary); }
.stat-card.stat-success  { border-top: 3px solid var(--success); }
.stat-card.stat-warning  { border-top: 3px solid var(--warning); }
.stat-card.stat-danger   { border-top: 3px solid var(--danger);  }
.stat-card.stat-info     { border-top: 3px solid var(--info);    }
.stat-card.stat-muted    { border-top: 3px solid var(--muted);   }
.stat-card.stat-primary .stat-num  { color: var(--primary); }
.stat-card.stat-success .stat-num  { color: var(--success); }
.stat-card.stat-warning .stat-num  { color: var(--warning); }
.stat-card.stat-danger  .stat-num  { color: var(--danger);  }
.stat-card.stat-info    .stat-num  { color: var(--info);    }

/* ══════════════════════════════════════════════════════
   Activity Cards
══════════════════════════════════════════════════════ */
.activity-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  transition: box-shadow var(--transition);
}
.activity-card:hover { box-shadow: var(--shadow); }
.activity-card.is-open {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}
.activity-card .ac-header {
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}
.activity-card.is-open .ac-header {
  background: var(--primary-light);
  border-bottom-color: rgba(37,99,235,.15);
}
.activity-card .ac-num {
  width: 32px; height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.activity-card .ac-title {
  font-weight: 700;
  font-size: .95rem;
  margin: 0;
  flex: 1;
}
.activity-card .ac-body {
  padding: .9rem 1.1rem;
}
.activity-card .ac-responses-table {
  max-height: 200px;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════
   Workshop Cards (Index)
══════════════════════════════════════════════════════ */
.workshop-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  transition: transform var(--transition), box-shadow var(--transition);
}
.workshop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.workshop-card .wc-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  padding: 1.1rem 1.25rem;
  color: #fff;
}
.workshop-card .wc-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
}
.workshop-card .wc-meta {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.workshop-card .wc-actions {
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  background: #f8fafc;
}

/* ══════════════════════════════════════════════════════
   Playlist Items
══════════════════════════════════════════════════════ */
.playlist-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: all var(--transition);
}
.playlist-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.playlist-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.playlist-card.is-current {
  border-color: rgba(22,163,74,.4);
  background: linear-gradient(180deg, #ffffff 0%, #f8fff9 100%);
  box-shadow: 0 0 0 2px rgba(22,163,74,.12);
}
.playlist-card .pi-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.playlist-card.is-current .pi-num {
  background: var(--success);
  color: #fff;
}
.playlist-card .pi-title {
  font-weight: 700;
  font-size: .92rem;
}
.playlist-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.playlist-item.is-current {
  border-color: var(--success);
  background: var(--success-light);
}
.playlist-item .pi-num {
  width: 28px; height: 28px;
  background: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.playlist-item.is-current .pi-num {
  background: var(--success);
  color: #fff;
}
.playlist-item .pi-title {
  font-weight: 600;
  font-size: .9rem;
  flex: 1;
  margin: 0;
}
.playlist-item .pi-type {
  font-size: .72rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   Participant Cards & Progress
══════════════════════════════════════════════════════ */
.participant-page {
  background: var(--bg);
  min-height: 100vh;
}
.participant-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 620px;
  margin: 2rem auto;
}
.participant-card .pc-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 1.4rem 1.5rem;
  color: #fff;
}
.participant-card .pc-body {
  padding: 1.5rem;
}
.participant-card .pc-footer {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

/* Progress Steps */
.progress-steps {
  direction: rtl;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 1rem 0;
}
.ps-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.ps-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: -1;
}
.ps-step.done:not(:last-child)::after    { background: var(--success); }
.ps-step.active:not(:last-child)::after  { background: var(--primary); }
.ps-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  z-index: 1;
  margin-inline: auto;
  transition: all var(--transition);
}
.ps-step.done   .ps-dot { background: var(--success); color: #fff; }
.ps-step.active .ps-dot {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.2);
}
.ps-label {
  font-size: .68rem;
  color: var(--muted);
  margin-top: .35rem;
  display: block;
  text-align: center;
}
.ps-step.active .ps-label { color: var(--primary); font-weight: 600; }
.ps-step.done   .ps-label { color: var(--success); }

.progress-step { position: relative; }
.progress-line { display: none; }

/* ── Waiting State ── */
.waiting-state {
  text-align: center;
  padding: 2.5rem 1rem;
}
.waiting-state .ws-spinner {
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(.95); }
}
.waiting-state .ws-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: .75rem 0 .3rem;
  color: var(--dark);
}
.waiting-state .ws-sub {
  font-size: .85rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   Buttons
══════════════════════════════════════════════════════ */
.btn-soft-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,.2);
  font-size: .83rem;
}
.btn-soft-primary:hover {
  background: var(--primary);
  color: #fff;
}
.btn-soft-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(22,163,74,.2);
  font-size: .83rem;
}
.btn-soft-success:hover {
  background: var(--success);
  color: #fff;
}
.btn-soft-warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid rgba(245,158,11,.2);
  font-size: .83rem;
}
.btn-soft-warning:hover {
  background: var(--warning);
  color: #fff;
}
.btn-soft-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,.2);
  font-size: .83rem;
}
.btn-soft-danger:hover {
  background: var(--danger);
  color: #fff;
}
.btn-soft-info {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(8,145,178,.2);
  font-size: .83rem;
}
.btn-soft-info:hover {
  background: var(--info);
  color: #fff;
}
.btn-soft-muted {
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: .83rem;
}
.btn-soft-muted:hover {
  background: #e2e8f0;
  color: var(--dark);
}

/* Danger zone buttons always with confirm */
.btn-danger-zone {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,.3);
  font-size: .83rem;
  font-weight: 600;
}
.btn-danger-zone:hover {
  background: var(--danger);
  color: #fff;
}

.danger-zone {
  background: #fff7f7;
  border: 1px solid rgba(220,38,38,.15);
  border-radius: 14px;
  padding: .7rem;
}

/* ══════════════════════════════════════════════════════
   Status Badges
══════════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  padding: .2em .65em;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge.s-published { background: var(--success-light); color: var(--success); }
.status-badge.s-draft     { background: var(--warning-light); color: #92400e; }
.status-badge.s-archived  { background: #f1f5f9; color: var(--muted); }
.status-badge.s-open      { background: var(--primary-light); color: var(--primary); }
.status-badge.s-closed    { background: #f1f5f9; color: var(--muted); }
.status-badge.s-active    { background: var(--success-light); color: var(--success); }

.participant-visibility-badge {
  font-size: .68rem;
}

.participant-visibility-badge--always {
  border: 1px solid rgba(22,163,74,.28);
}

.dropdown-menu {
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  z-index: 3000;
}
[dir="rtl"] .dropdown-menu {
  text-align: right;
}
[dir="rtl"] .dropdown-menu.dropdown-menu-start {
  inset: auto auto auto 0;
}
[dir="rtl"] .dropdown-menu.dropdown-menu-end {
  inset: auto 0 auto auto;
}

.playlist-card .action-row {
  position: relative;
  z-index: 2;
}

.playlist-card .action-cell .dropdown-menu {
  min-width: 190px;
  z-index: 4000;
}

/* ══════════════════════════════════════════════════════
   Section Title
══════════════════════════════════════════════════════ */
.section-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
}

/* ══════════════════════════════════════════════════════
   Empty State
══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}
.empty-state .es-icon {
  font-size: 3rem;
  margin-bottom: .75rem;
  display: block;
  opacity: .6;
}
.empty-state .es-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .4rem;
}
.empty-state .es-sub {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  max-width: 320px;
  margin-inline: auto;
}

/* ══════════════════════════════════════════════════════
   Info Grid (Field:Value)
══════════════════════════════════════════════════════ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .9rem;
}
.info-grid-item {}
.info-grid-item .ig-label {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .15rem;
}
.info-grid-item .ig-value {
  font-size: .92rem;
  font-weight: 600;
  color: var(--dark);
}

/* ══════════════════════════════════════════════════════
   Tables
══════════════════════════════════════════════════════ */
.app-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  direction: rtl;
}
.app-table th {
  background: #f1f5f9;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .65rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.app-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: .88rem;
}
.app-table tbody tr:hover { background: #f8fafc; }
.app-table tbody tr:last-child td { border-bottom: none; }

.table-responsive {
  border-radius: 14px;
  overflow: visible;
}

/* Participant list cards in trainer panel */
.participants-cards-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
}

.participant-card-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .95rem 1rem;
  box-shadow: var(--shadow-sm);
}

.participant-name {
  font-size: .98rem;
  font-weight: 800;
  color: var(--dark);
}

.participant-identity {
  font-size: .78rem;
  color: var(--muted);
}

.participant-edu {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .84rem;
}

.participant-status {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.participant-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  overflow: visible;
}

.participant-meta,
.participant-status,
.participant-actions,
.section-card,
.soft-card,
.table-responsive {
  overflow: visible;
}

.soft-card,
.section-card,
.activity-card,
.workshop-card,
.playlist-card {
  overflow: visible;
}

.action-cell,
.participant-actions,
.activity-actions,
.workshop-actions,
.wc-actions,
.ac-header,
.dropdown {
  position: relative;
  overflow: visible;
}

/* Extra safety for dropdown clipping in cards/tables */
.table,
.table-striped,
.table-hover,
.table-bordered,
.card,
.card-body,
.card-header,
.wc-meta,
.wc-actions,
.playlist-card,
.participant-card-row,
.info-card,
.section-card {
  overflow: visible;
}

/* ══════════════════════════════════════════════════════
   Toggle Switch (للإقرار/التوقيع)
══════════════════════════════════════════════════════ */
.toggle-control {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.toggle-control .tc-label {
  font-weight: 700;
  font-size: .9rem;
}
.toggle-control .tc-status {
  font-size: .8rem;
  color: var(--muted);
}
.toggle-control.tc-open {
  border-color: var(--success);
  background: var(--success-light);
}
.toggle-control.tc-open .tc-label { color: var(--success); }

/* ══════════════════════════════════════════════════════
   Resource Cards
══════════════════════════════════════════════════════ */
.resource-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: all var(--transition);
}
.resource-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.resource-card .rc-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.resource-card .rc-title {
  font-weight: 600;
  font-size: .88rem;
}
.resource-card .rc-desc {
  font-size: .75rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   Presentation Mode
══════════════════════════════════════════════════════ */
.presentation-shell {
  background: #0a0a0f;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.pres-header {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: .6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.pres-header .pres-title {
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pres-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pres-iframe-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
}
.pres-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.pres-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem;
}

/* ══════════════════════════════════════════════════════
   Alerts & Toasts
══════════════════════════════════════════════════════ */
.app-alert {
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .88rem;
  border: 1px solid;
}
.app-alert.aa-success { background: var(--success-light); border-color: rgba(22,163,74,.2); color: var(--success); }
.app-alert.aa-warning { background: var(--warning-light); border-color: rgba(245,158,11,.2); color: #92400e; }
.app-alert.aa-info    { background: var(--info-light);    border-color: rgba(8,145,178,.2);  color: var(--info); }
.app-alert.aa-danger  { background: var(--danger-light);  border-color: rgba(220,38,38,.2);  color: var(--danger); }

/* ══════════════════════════════════════════════════════
   Misc Utilities
══════════════════════════════════════════════════════ */
.trainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}
.scrollable-body {
  max-height: 240px;
  overflow-y: auto;
}
.text-primary-custom { color: var(--primary) !important; }
.text-success-custom { color: var(--success) !important; }
.text-muted-custom   { color: var(--muted)   !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.gap-xs { gap: .35rem !important; }
.rounded-custom { border-radius: var(--radius) !important; }

.app-shell .form-text {
  color: #64748b;
  font-size: .78rem;
}

/* ── Copy Button ── */
.btn-copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .1rem .45rem;
  font-size: .73rem;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-copy:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-copy.copied { background: var(--success); color: #fff; border-color: var(--success); }

/* ══════════════════════════════════════════════════════
   Responsive
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .page-hero { padding: 1.1rem 1rem 1rem; }
  .page-title { font-size: 1.1rem; }
  .stat-card .stat-num { font-size: 1.6rem; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .action-bar { gap: .3rem; }
  .participant-card { margin: .75rem; border-radius: var(--radius); }
  .participant-card .pc-body { padding: 1.1rem; }
}
@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
  .app-table { font-size: .8rem; }
  .app-table th, .app-table td { padding: .5rem .6rem; }
}

/* ══════════════════════════════════════════════════════
   Print
══════════════════════════════════════════════════════ */
@media print {
  .app-header, .action-bar, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .soft-card, .info-card { box-shadow: none; border: 1px solid #ddd; }
  .page-hero { background: none; color: var(--dark); border-bottom: 2px solid #333; padding: .5rem 0; border-radius: 0; }
  .page-title { color: var(--dark); font-size: 18pt; }
}
