/* ================================================================
   AiGinex Student Progress Tracker v2.0 — Full CSS Rebuild
   Prefix: .aigst — zero conflict with existing styles
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── RESET & ROOT VARS ──────────────────────────────────────── */
.aigst {
  /* Brand Colors */
  --primary:       #2563eb;
  --primary-d:     #1d4ed8;
  --primary-l:     #eff6ff;
  --primary-ring:  rgba(37,99,235,.15);
  --sup-color:     #7c3aed;
  --sup-l:         #f5f3ff;
  --guide-color:   #0284c7;
  --guide-l:       #e0f2fe;
  --green:         #059669;
  --green-l:       #ecfdf5;
  --red:           #dc2626;
  --red-l:         #fef2f2;
  --amber:         #d97706;
  --amber-l:       #fffbeb;
  /* Surfaces */
  --bg:            #f1f5f9;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #f1f5f9;
  /* Borders */
  --border:        #e2e8f0;
  --border-2:      #cbd5e1;
  /* Text */
  --ink:           #0f172a;
  --ink-2:         #1e293b;
  --ink-3:         #475569;
  --ink-4:         #94a3b8;
  --ink-5:         #cbd5e1;
  /* Radii */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-full: 9999px;
  /* Shadows */
  /* Type */
  --font:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', monospace;

  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.aigst *, .aigst *::before, .aigst *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ════════════════════════════════════════════════════════════════
   HEADER HERO
════════════════════════════════════════════════════════════════ */
.aigst-header {
  border-radius: var(--r-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.aigst-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.aigst-header::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  pointer-events: none;
}

.aigst-header-guide {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 40%, #0284c7 100%);
}

.aigst-header-sup {
  background: linear-gradient(135deg, #3b0764 0%, #6d28d9 40%, #a78bfa 100%);
}

/* Avatar */
.aigst-hdr-avatar { position: relative; flex-shrink: 0; z-index: 1; }

.aigst-hdr-avatar img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.4);
  display: block;
}

.aigst-avatar-init {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 3px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff;
  letter-spacing: -.5px;
}

.aigst-av-student { background: var(--guide-color) !important; color: #fff !important; }
.aigst-av-sup     { background: var(--sup-color) !important; color: #fff !important; }

/* Header info */
.aigst-hdr-info { flex: 1; z-index: 1; }

.aigst-role-pill {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 12px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  margin-bottom: 7px;
}

.aigst-hdr-info h2 {
  font-size: 22px; font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
  letter-spacing: -.3px;
}

.aigst-hdr-info p {
  font-size: 13px;
  color: rgba(255,255,255,.72);
  font-weight: 500;
}

/* Stats */
.aigst-hdr-stats {
  display: flex; gap: 10px;
  flex-shrink: 0; z-index: 1;
  flex-wrap: wrap;
}

.aigst-stat {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-md);
  padding: 12px 18px;
  text-align: center;
  min-width: 76px;
  transition: background .15s;
}

.aigst-stat:hover { background: rgba(255,255,255,.2); }
.aigst-stat-hi    { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.3); }

.aigst-stat span  { display: block; font-size: 24px; font-weight: 800; color: #fff; line-height: 1.1; }
.aigst-stat small { display: block; font-size: 10px; font-weight: 600; color: rgba(255,255,255,.65); margin-top: 3px; text-transform: uppercase; letter-spacing: .06em; }

/* ════════════════════════════════════════════════════════════════
   BANNERS
════════════════════════════════════════════════════════════════ */
.aigst-banner {
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.aigst-banner-info {
  background: var(--primary-l);
  border-color: #bfdbfe;
  color: #1e40af;
}

.aigst-banner-warn {
  background: var(--amber-l);
  border-color: #fde68a;
  color: #92400e;
}

.aigst-banner-dates {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255,255,255,.6);
  padding: 2px 10px;
  border-radius: var(--r-xs);
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════
   TABS
════════════════════════════════════════════════════════════════ */
.aigst-tabs {
  display: flex; flex-wrap: wrap; gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 4px;
  margin-bottom: 24px;
}

.aigst-tab {
  flex: 1;
  padding: 9px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  border-radius: var(--r-md);
  transition: all .15s ease;
  white-space: nowrap;
  text-align: center;
  letter-spacing: .01em;
}

.aigst-tab:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.aigst-tab.active {
  background: var(--primary);
  color: #fff;
}

/* ════════════════════════════════════════════════════════════════
   PANELS
════════════════════════════════════════════════════════════════ */
.aigst-panel { animation: panel-in .2s ease; }
@keyframes panel-in { from { opacity:0;  } to { opacity:1; transform:none; } }

.aigst-panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}

.aigst-panel-hdr h3 {
  font-size: 18px; font-weight: 700;
  color: var(--ink);
  letter-spacing: -.2px;
}

/* ════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════ */
.aigst-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
  background: var(--surface);
  color: var(--ink-2);
  line-height: 1;
}

.aigst-btn:hover { background: var(--surface-3); border-color: var(--border-2); }

.aigst-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.aigst-btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }

.aigst-btn-green {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.aigst-btn-green:hover { background: #047857; border-color: #047857; }

.aigst-btn-disabled {
  background: var(--surface-3);
  color: var(--ink-4);
  border-color: var(--border);
  cursor: not-allowed;
}

.aigst-btn-disabled:hover { transform: none; background: var(--surface-3); }

.aigst-btn-sm { padding: 5px 12px; font-size: 11px; }

.w100 { width: 100%; }

/* Icon buttons */
.aigst-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  font-size: 14px;
  background: transparent;
  transition: all .12s;
  flex-shrink: 0;
}

.aigst-icon-del { color: var(--red); }
.aigst-icon-del:hover { background: var(--red-l); transform: scale(1.1); }

/* ════════════════════════════════════════════════════════════════
   FORM ELEMENTS
════════════════════════════════════════════════════════════════ */
.aigst-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

.aigst-input:focus {
  border-color: var(--primary);
}

.aigst-input::placeholder { color: var(--ink-4); }

textarea.aigst-input { resize: vertical; min-height: 80px; line-height: 1.5; }

.aigst-fgroup {
  display: flex; flex-direction: column; gap: 6px;
}

.aigst-fgroup label, .aigst-fgroup > span {
  font-size: 12px; font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.aigst-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.aigst-check-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--ink-2);
  margin-top: 6px;
}

.aigst-check-label input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Type picker buttons */
.aigst-type-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.aigst-type-btn {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-family: var(--font);
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  min-width: 100px;
}

.aigst-type-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.aigst-type-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ════════════════════════════════════════════════════════════════
   INFO / ALERT NOTES
════════════════════════════════════════════════════════════════ */
.aigst-info-note {
  background: var(--primary-l);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 20px;
  line-height: 1.6;
}

.aigst-alert {
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13px; font-weight: 600;
  line-height: 1.4;
}

.aigst-alert-ok  { background: var(--green-l); color: #065f46; border: 1px solid #6ee7b7; }
.aigst-alert-err { background: var(--red-l);   color: #991b1b; border: 1px solid #fca5a5; }

/* ════════════════════════════════════════════════════════════════
   BADGES & PILLS
════════════════════════════════════════════════════════════════ */
.aigst-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--r-full);
  min-width: 22px;
  letter-spacing: .02em;
}

.aigst-q-pill {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  white-space: nowrap; flex-shrink: 0;
}

.aigst-qp-yes_no       { background: #dcfce7; color: #166534; }
.aigst-qp-short_answer { background: #dbeafe; color: #1e40af; }
.aigst-qp-remark       { background: #fef9c3; color: #854d0e; }

.aigst-active-dot {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--green);
  background: var(--green-l);
  padding: 2px 9px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.aigst-active-green { background: var(--green); color: #fff; border-radius: var(--r-full); padding: 2px 10px; font-size: 11px; font-weight: 700; }

.aigst-pill-sup   { background: var(--sup-l);   color: var(--sup-color);   padding: 3px 12px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; }
.aigst-pill-guide { background: var(--guide-l); color: var(--guide-color); padding: 3px 12px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   STUDENT CARDS (Guide Teacher view)
════════════════════════════════════════════════════════════════ */
.aigst-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin-bottom: 16px;
}

.aigst-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.aigst-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.aigst-card:hover {
  
}

.aigst-card-top {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--surface-3);
}

.aigst-s-photo {
  width: 54px; height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2.5px solid var(--border);
}

.aigst-s-photo.aigst-avatar-init {
  font-size: 20px;
  width: 54px; height: 54px;
}

.aigst-card-top h4 {
  font-size: 14px; font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.3;
}

.aigst-chips { display: flex; gap: 4px; flex-wrap: wrap; }

.aigst-chip {
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 10px; font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  letter-spacing: .02em;
}

.aigst-chip-id { background: #e0f2fe; color: #0369a1; font-family: var(--mono); }

.aigst-card-mid {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px;
  font-size: 12px; color: var(--ink-3);
}

.aigst-prev-badge {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 18px;
  font-size: 11px; font-weight: 600;
  color: var(--green);
  background: var(--green-l);
  border-top: 1px solid #a7f3d0;
}

.aigst-link-btn {
  background: none; border: none;
  color: var(--primary);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: var(--font);
}

.aigst-card-foot { padding: 12px 18px 18px; }

/* ════════════════════════════════════════════════════════════════
   QUESTION BLOCK (guide teacher form)
════════════════════════════════════════════════════════════════ */
.aigst-q-block {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.aigst-q-block:last-child { border-bottom: none; }

.aigst-q-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.aigst-yn { display: flex; gap: 10px; }

.aigst-yn-opt {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: var(--surface-3);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  color: var(--ink-2);
}

.aigst-yn-opt:has(input:checked) {
  background: var(--primary-l);
  border-color: var(--primary);
  color: var(--primary-d);
}

.aigst-yn-opt input { display: none; }

/* ════════════════════════════════════════════════════════════════
   ROLES LIST
════════════════════════════════════════════════════════════════ */
.aigst-role-list { display: flex; flex-direction: column; gap: 10px; }

.aigst-role-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  transition: box-shadow .15s, transform .15s;
}

.aigst-role-row:hover {  }
.aigst-role-row-sup   { border-left-color: var(--sup-color); }
.aigst-role-row-guide { border-left-color: var(--guide-color); }

.aigst-role-photo {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.aigst-role-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.aigst-role-info strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.aigst-role-info small  { font-size: 12px; color: var(--ink-3); }

.aigst-role-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   ALLOCATIONS
════════════════════════════════════════════════════════════════ */
.aigst-alloc-container { display: flex; flex-direction: column; gap: 16px; }

.aigst-alloc-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.aigst-alloc-thdr {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}

.aigst-alloc-tphoto {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.aigst-alloc-thdr > div { flex: 1; }
.aigst-alloc-thdr strong { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.aigst-alloc-thdr small  { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.aigst-alloc-students { padding: 4px 0; }

.aigst-alloc-srow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--surface-3);
  transition: background .1s;
}
.aigst-alloc-srow:last-child { border-bottom: none; }
.aigst-alloc-srow:hover { background: var(--surface-2); }

.aigst-alloc-sphoto {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.aigst-alloc-srow > div { flex: 1; }
.aigst-alloc-srow strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.aigst-alloc-srow small  { font-size: 11px; color: var(--ink-3); }

/* Allocation modal grid */
.aigst-alloc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.aigst-step-label {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-l);
  margin-bottom: 12px;
}

/* Filter bar */
.aigst-filter-input {
  max-width: 400px;
  margin-bottom: 16px;
}

/* ════════════════════════════════════════════════════════════════
   QUESTIONS BANK
════════════════════════════════════════════════════════════════ */
.aigst-q-bank { display: flex; flex-direction: column; gap: 8px; }

.aigst-q-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: box-shadow .12s;
}
.aigst-q-row:hover { }
.aigst-q-text { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* ════════════════════════════════════════════════════════════════
   ACTIVE QUESTION SET
════════════════════════════════════════════════════════════════ */
.aigst-active-list { display: flex; flex-direction: column; gap: 8px; }

.aigst-active-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.aigst-active-row:hover { border-color: var(--primary); background: var(--primary-l); }
.aigst-active-row:has(.aigst-active-cb:checked) {
  background: var(--primary-l);
  border-color: var(--primary);
}

.aigst-active-cb {
  width: 17px; height: 17px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.aigst-active-row > span:not(.aigst-q-pill) {
  font-size: 13px; font-weight: 500; color: var(--ink);
}

/* ════════════════════════════════════════════════════════════════
   DATE RANGES
════════════════════════════════════════════════════════════════ */
.aigst-dates-list { display: flex; flex-direction: column; gap: 10px; }

.aigst-date-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  transition: box-shadow .12s;
}
.aigst-date-row:hover { }
.aigst-date-active { border-color: var(--green); background: var(--green-l); }

.aigst-date-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.aigst-date-info strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.aigst-date-info small  { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.aigst-date-btns { display: flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════════════════════════
   REPORTS FILTERS
════════════════════════════════════════════════════════════════ */
.aigst-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.aigst-fgroup { flex: 1; min-width: 140px; }
.aigst-fgroup-wide { flex: 2; min-width: 200px; }
.aigst-fgroup-btns { display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }

/* Report Summary */
.aigst-report-summary {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}

.aigst-sum-card {
  flex: 1; min-width: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  text-align: center;
}

.aigst-sum-card span { display: block; font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.aigst-sum-card small { display: block; font-size: 10px; font-weight: 700; color: var(--ink-4); margin-top: 5px; text-transform: uppercase; letter-spacing: .06em; }

/* ════════════════════════════════════════════════════════════════
   REPORT OUTPUT
════════════════════════════════════════════════════════════════ */
.aigst-rpt-tblock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.aigst-rpt-thdr {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(90deg, rgba(37,99,235,.05), transparent);
  border-bottom: 1px solid var(--border);
}

.aigst-rpt-tphoto {
  width: 46px; height: 46px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); flex-shrink: 0;
}

.aigst-rpt-thdr > div { flex: 1; }
.aigst-rpt-thdr strong { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.aigst-rpt-thdr small  { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.aigst-rpt-students { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }

.aigst-rpt-scard {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.aigst-rpt-shdr {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.aigst-rpt-sphoto {
  width: 38px; height: 38px;
  border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 2px solid var(--border);
}

.aigst-rpt-shdr > div { flex: 1; }
.aigst-rpt-shdr strong { display: block; font-size: 13px; font-weight: 700; }
.aigst-rpt-shdr small  { font-size: 11px; color: var(--ink-3); }

.aigst-rpt-sub { padding: 10px 15px; border-bottom: 1px solid var(--surface-3); }
.aigst-rpt-sub:last-child { border-bottom: none; }

.aigst-rpt-time {
  font-size: 11px; font-weight: 600;
  color: var(--ink-3);
  font-family: var(--mono);
  margin-bottom: 8px;
}

.aigst-rpt-answers { display: flex; flex-direction: column; gap: 6px; }

.aigst-rpt-arow {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px;
}

.aigst-rpt-qt { flex: 1; color: var(--ink-2); font-weight: 500; line-height: 1.4; }

.aigst-rpt-ans {
  font-weight: 700; font-size: 12px;
  padding: 2px 10px; border-radius: var(--r-xs);
  background: var(--surface-3); color: var(--ink);
  flex-shrink: 0; white-space: nowrap;
}

.aigst-a-yes { background: #dcfce7; color: #166534; }
.aigst-a-no  { background: #fee2e2; color: #991b1b; }

/* ════════════════════════════════════════════════════════════════
   MODALS
   CRITICAL: NO display:flex here — JS controls visibility.
   Only layout properties set here (apply when JS sets display:flex).
════════════════════════════════════════════════════════════════ */
.aigst-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 14, 30, 0.82);
  -webkit-
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.aigst-modal-box {
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  position: relative;
  animation: modal-enter .2s ease both;
}

.aigst-modal-wide { max-width: 820px !important; }

@keyframes modal-enter {
  from { opacity: 0;  }
  to   { opacity: 1; transform: none; }
}

.aigst-modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 10;
  border-radius: 22px 22px 0 0;
}

.aigst-modal-hdr h3 {
  font-size: 17px; font-weight: 700;
  color: var(--ink);
  letter-spacing: -.2px;
}

.aigst-modal-x {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--surface-3);
  font-size: 14px; font-weight: 700;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}

.aigst-modal-x:hover {
  background: var(--red-l);
  color: var(--red);
  transform: scale(1.1) rotate(90deg);
}

.aigst-modal-body {
  padding: 22px 26px;
  display: flex; flex-direction: column; gap: 16px;
}

.aigst-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 22px 22px;
  position: sticky; bottom: 0;
}

/* ════════════════════════════════════════════════════════════════
   DROPDOWN (search results)
════════════════════════════════════════════════════════════════ */
.aigst-dropdown {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  max-height: 230px;
  overflow-y: auto;
  margin-top: 5px;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.aigst-dropdown::-webkit-scrollbar { width: 5px; }
.aigst-dropdown::-webkit-scrollbar-track { background: transparent; }
.aigst-dropdown::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.aigst-drop-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-3);
  transition: background .1s;
}
.aigst-drop-row:last-child { border-bottom: none; }
.aigst-drop-row:hover { background: var(--primary-l); }

.aigst-drop-photo {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.aigst-drop-init {
  background: var(--guide-l);
  color: var(--guide-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}

.aigst-drop-row strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.aigst-drop-row small  { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.aigst-drop-loading, .aigst-drop-empty, .aigst-drop-err {
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}
.aigst-drop-err { color: var(--red); }

/* Selected row */
.aigst-selected-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-l);
  border: 1.5px solid var(--primary);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-top: 8px;
}

.aigst-sel-photo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary);
}

.aigst-selected-row > div { flex: 1; }
.aigst-selected-row strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.aigst-selected-row small  { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════
   HISTORY (Guide Teacher)
════════════════════════════════════════════════════════════════ */
.aigst-hist-block {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.aigst-hist-time {
  background: var(--surface-2);
  padding: 8px 14px;
  font-size: 11px; font-weight: 700;
  font-family: var(--mono);
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}

.aigst-hist-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--surface-3);
  font-size: 12px;
}
.aigst-hist-row:last-child { border-bottom: none; }
.aigst-hist-q { flex: 1; color: var(--ink-2); font-weight: 500; }
.aigst-hist-a { font-weight: 700; color: var(--ink); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   EMPTY / SETUP / ACCESS DENIED STATES
════════════════════════════════════════════════════════════════ */
.aigst-empty {
  text-align: center;
  padding: 52px 28px;
  background: var(--surface);
  border: 2px dashed var(--border-2);
  border-radius: var(--r-xl);
}

.aigst-empty-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 16px;
  opacity: .6;
}

.aigst-empty h3 { font-size: 18px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.aigst-empty p  { font-size: 13px; color: var(--ink-3); max-width: 320px; margin: 0 auto; }

.aigst-empty-text { text-align: center; color: var(--ink-3); font-size: 13px; padding: 24px; }

.aigst-loading {
  text-align: center;
  padding: 32px;
  color: var(--ink-3);
  font-size: 13px;
}

.aigst-setup-box {
  text-align: center;
  padding: 52px 32px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #fde68a;
  border-radius: var(--r-xl);
}

.aigst-setup-icon { font-size: 56px; display: block; margin-bottom: 18px; }
.aigst-setup-box h3 { font-size: 22px; font-weight: 800; color: #92400e; margin-bottom: 12px; }
.aigst-setup-box p  { font-size: 14px; color: #78350f; margin-bottom: 8px; line-height: 1.6; max-width: 480px; margin-left: auto; margin-right: auto; }

.aigst-denied {
  text-align: center;
  padding: 52px 28px;
  background: var(--red-l);
  border: 1.5px solid #fca5a5;
  border-radius: var(--r-xl);
}

.aigst-denied-icon { font-size: 52px; margin-bottom: 14px; }
.aigst-denied p { color: #991b1b; font-size: 15px; font-weight: 600; }

/* ════════════════════════════════════════════════════════════════
   SCROLLBAR (global for aigst)
════════════════════════════════════════════════════════════════ */
.aigst * {
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.aigst *::-webkit-scrollbar { width: 6px; height: 6px; }
.aigst *::-webkit-scrollbar-track { background: transparent; }
.aigst *::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.aigst *::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .aigst-header { flex-direction: column; text-align: center; padding: 22px 20px; }
  .aigst-hdr-stats { justify-content: center; }
  .aigst-hdr-info h2 { font-size: 18px; }
  .aigst-cards { grid-template-columns: 1fr; }
  .aigst-alloc-grid { grid-template-columns: 1fr; }
  .aigst-row2 { grid-template-columns: 1fr; }
  .aigst-modal-box {
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  position: relative;
  animation: modal-enter .2s ease both;
}
  .aigst-modal-wide { max-width: 100% !important; }
  .aigst-tabs { gap: 2px; }
  .aigst-tab { font-size: 11px; padding: 7px 8px; }
  .aigst-filters { flex-direction: column; }
  .aigst-fgroup { min-width: unset; }
  .aigst-report-summary { flex-wrap: wrap; }
  .aigst-rpt-thdr { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .aigst-tab { font-size: 10px; padding: 6px 5px; }
  .aigst-alloc-block .aigst-alloc-thdr { flex-wrap: wrap; }
}

/* ── ROLE PICKER CARDS ────────────────────────────────────── */
.aigst-role-pick {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 16px 12px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: border-color .15s, background .15s !important;
  user-select: none !important;
  gap: 8px !important;
}

.aigst-role-pick:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}

.aigst-role-pick.active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
}

.aigst-role-pick-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.aigst-role-pick-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.aigst-role-pick-desc {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* ── TITLE SELECTOR BAR ─────────────────────────────────────── */
.aigst-title-selector-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.aigst-title-selector-bar label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.aigst-title-select { max-width: 360px; }

/* ── TITLE CARDS ─────────────────────────────────────────────── */
.aigst-titles-list { display: flex; flex-direction: column; gap: 12px; }

.aigst-title-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-left: 5px solid #e2e8f0;
  border-radius: 14px;
}

.aigst-title-active   { border-left-color: #2563eb; }
.aigst-title-inactive { border-left-color: #cbd5e1; opacity: .75; }

.aigst-title-card-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }

.aigst-title-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.aigst-title-info { flex: 1; min-width: 0; }

.aigst-title-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aigst-title-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aigst-title-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.aigst-title-card-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.aigst-title-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.aigst-status-active   { background: #dcfce7; color: #166534; }
.aigst-status-inactive { background: #f1f5f9; color: #64748b; }

/* ── TITLE GROUP (Guide Teacher view) ────────────────────────── */
.aigst-title-group { margin-bottom: 28px; }

.aigst-title-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  margin-bottom: 14px;
}

.aigst-title-group-icon { font-size: 18px; }

.aigst-title-group-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e40af;
  flex: 1;
}

/* ── DATE RANGE inactive dot ─────────────────────────────────── */
.aigst-date-inactive-dot {
  background: #f1f5f9;
  color: #64748b;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ── TITLE CARD (supervisor) ─────────────────────────────────── */
.aigst-titles-list { display:flex; flex-direction:column; gap:14px; }

.aigst-title-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-left: 5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}
.aigst-title-active   { border-left-color: #2563eb; }
.aigst-title-inactive { border-left-color: #cbd5e1; opacity:.8; }

.aigst-title-card-hdr {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
}

.aigst-title-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: #eff6ff; display:flex; align-items:center; justify-content:center;
  font-size: 22px; flex-shrink:0;
}

.aigst-title-info { flex:1; min-width:0; }
.aigst-title-name { font-size:16px; font-weight:700; color:#0f172a; margin-bottom:2px; }
.aigst-title-desc { font-size:12px; color:#64748b; margin-bottom:4px; }
.aigst-title-date { font-size:11px; color:#2563eb; font-family:'JetBrains Mono',monospace; }

.aigst-title-meta { display:flex; gap:12px; flex-wrap:wrap; font-size:11px; color:#64748b; font-weight:500; margin-top:5px; }

.aigst-title-card-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }

.aigst-title-status { font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; white-space:nowrap; }
.aigst-status-active   { background:#dcfce7; color:#166534; }
.aigst-status-inactive { background:#f1f5f9; color:#64748b; }

/* Expand panel */
.aigst-title-expand {
  border-top: 2px solid #e2e8f0;
  background: #f8fafc;
}
.aigst-title-expand-inner { padding: 20px; display:flex; flex-direction:column; gap:20px; }

.aigst-expand-section {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.aigst-expand-section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px; font-weight: 700; color: #334155;
}

/* Question picker inside title */
.aigst-qpicker { display:flex; flex-direction:column; gap:6px; padding:12px 16px; }
.aigst-qpicker-row {
  display:flex; align-items:center; gap:10px;
  padding:9px 12px; background:#fff; border:1.5px solid #e2e8f0;
  border-radius:8px; cursor:pointer; transition:all .12s;
  font-size:13px; font-weight:500; color:#0f172a;
}
.aigst-qpicker-row:hover { border-color:#2563eb; background:#eff6ff; }
.aigst-qpicker-row:has(.aigst-qpick-cb:checked) { background:#eff6ff; border-color:#2563eb; }
.aigst-qpick-cb { width:16px; height:16px; flex-shrink:0; accent-color:#2563eb; cursor:pointer; }

/* Alloc wrap inside expand */
.aigst-alloc-wrap { padding: 8px 0; }

/* ── GUIDE TEACHER: title group ──────────────────────────────── */
.aigst-gt-title-group {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 22px;
}

.aigst-gt-title-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(90deg, #eff6ff, #fff);
  border-bottom: 2px solid #e2e8f0;
}

.aigst-gt-title-icon { font-size: 24px; flex-shrink:0; }
.aigst-gt-title-info { flex:1; }
.aigst-gt-title-name { font-size:16px; font-weight:800; color:#1e40af; }
.aigst-gt-title-desc { font-size:12px; color:#64748b; margin-top:2px; }
.aigst-gt-title-date { font-size:11px; color:#2563eb; font-family:'JetBrains Mono',monospace; margin-top:3px; }

/* Title selector bar */
.aigst-title-selector-bar {
  display:flex; align-items:center; gap:12px;
  background:#f8fafc; border:1.5px solid #e2e8f0;
  border-radius:10px; padding:10px 14px; margin-bottom:14px;
}
.aigst-title-selector-bar label { font-size:12px; font-weight:700; color:#475569; white-space:nowrap; text-transform:uppercase; letter-spacing:.05em; }
.aigst-title-select { max-width:360px; }

/* ══════════════════════════════════════════════════════════
   MULTI-STUDENT ALLOCATION — Step 2 filters + checklist
══════════════════════════════════════════════════════════ */

/* Filter dropdowns row */
.aigst-student-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.aigst-filter-sel { font-size: 13px !important; padding: 7px 10px !important; }

/* Name search under filters */
.aigst-student-name-search { margin-bottom: 8px !important; }

/* Header row: count + select-all */
.aigst-student-list-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 2px;
  margin-bottom: 4px;
}
.aigst-link-btn {
  background: none; border: none; cursor: pointer;
  color: #2563eb; font-size: 12px; font-weight: 700;
  padding: 0; text-decoration: underline;
}
.aigst-link-btn:hover { color: #1d4ed8; }

/* Scrollable checklist container */
.aigst-student-checklist {
  max-height: 260px;
  overflow-y: auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

/* Hint / loading text */
.aigst-s-hint {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.aigst-loading-row { color: #2563eb; }
.aigst-error { color: #dc2626; }

/* Each student row */
.aigst-s-chk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid #f1f5f9;
}
.aigst-s-chk-row:last-child { border-bottom: none; }
.aigst-s-chk-row:hover { background: #eff6ff; }
.aigst-s-chk-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}
/* Checked row highlight */
.aigst-s-chk-row:has(input:checked) {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

/* Student avatar in checklist */
.aigst-s-chk-photo {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* Student name + meta */
.aigst-s-chk-info { flex: 1; min-width: 0; }
.aigst-s-chk-info strong {
  display: block;
  font-size: 13px; font-weight: 700;
  color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aigst-s-chk-info small {
  font-size: 11px; color: #64748b;
}

/* Wider modal for Step 2 filters */
@media (max-width: 640px) {
  .aigst-student-filters { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   SMOOTH ALLOCATION DELETE ANIMATIONS
══════════════════════════════════════════════════════════════ */

/* Student row — entry animation when list is freshly rendered */
.aigst-alloc-srow {
  animation: aigst-row-in 0.22s ease both;
}
@keyframes aigst-row-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Delete button — pulse on hover to hint interactivity */
.aigst-alloc-srow .aigst-icon-del {
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.aigst-alloc-srow .aigst-icon-del:hover {
  transform: scale(1.18);
}
.aigst-alloc-srow .aigst-icon-del:active {
  transform: scale(0.92);
}

/* Teacher block — slide-in when list loads */
.aigst-alloc-block {
  animation: aigst-block-in 0.26s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes aigst-block-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Badge update flash */
.aigst-badge {
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── Question row animations ── */
.aigst-q-row {
  animation: aigst-qrow-in 0.2s ease both;
}
@keyframes aigst-qrow-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.aigst-q-row .aigst-icon-del {
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.aigst-q-row .aigst-icon-del:hover  { transform: scale(1.2); }
.aigst-q-row .aigst-icon-del:active { transform: scale(0.9); }

/* ══════════════════════════════════════════════════════════════
   GUIDE TEACHERS PERFORMANCE TAB
══════════════════════════════════════════════════════════════ */

/* Period filter bar */
.aigst-teacher-period-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
  flex-wrap: wrap;
}
.aigst-period-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}
.aigst-period-pill {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.18s ease;
}
.aigst-period-pill:hover {
  border-color: #94a3b8;
  background: #e9f0f8;
}
.aigst-period-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,.28);
}

/* Loading state */
.aigst-teacher-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 48px 24px;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}
.aigst-tl-spinner {
  width: 28px; height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: aigst-spin 0.8s linear infinite;
}
@keyframes aigst-spin { to { transform: rotate(360deg); } }

/* Summary bar */
.aigst-teacher-summary-bar {
  display: flex;
  gap: 14px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}
.aigst-tsb-card {
  flex: 1;
  min-width: 110px;
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 1.5px solid #e2e8f0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.aigst-tsb-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.aigst-tsb-val {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.aigst-tsb-lbl { font-size: 12px; font-weight: 600; color: #475569; }
.aigst-tsb-sub { font-size: 11px; color: #94a3b8; }

.aigst-tsb-total   { border-color: #c7d2fe; background: linear-gradient(135deg,#eef2ff,#fff); }
.aigst-tsb-total .aigst-tsb-val { color: #4f46e5; }
.aigst-tsb-active  { border-color: #bbf7d0; background: linear-gradient(135deg,#f0fdf4,#fff); }
.aigst-tsb-active .aigst-tsb-val { color: #16a34a; }
.aigst-tsb-inactive{ border-color: #fde68a; background: linear-gradient(135deg,#fffbeb,#fff); }
.aigst-tsb-inactive .aigst-tsb-val { color: #d97706; }
.aigst-tsb-reports { border-color: #bae6fd; background: linear-gradient(135deg,#f0f9ff,#fff); }
.aigst-tsb-reports .aigst-tsb-val { color: #0284c7; }

/* Teacher cards grid */
.aigst-teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  padding: 4px 0 24px;
}

.aigst-teacher-card {
  background: #fff;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  animation: aigst-card-in 0.3s cubic-bezier(0.4,0,0.2,1) both;
  transition: transform .2s ease, box-shadow .2s ease;
}
@keyframes aigst-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aigst-teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.aigst-tc-active { border-color: #86efac; background: linear-gradient(180deg,#f0fdf4 0%,#fff 60%); }
.aigst-tc-inactive { border-color: #fde68a; background: linear-gradient(180deg,#fffbeb 0%,#fff 60%); }

/* Card top row */
.aigst-tc-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.aigst-tc-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #e2e8f0;
}
.aigst-tc-init {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aigst-tc-meta { flex: 1; min-width: 0; }
.aigst-tc-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aigst-tc-desig { font-size: 12px; color: #64748b; margin-top: 2px; }
.aigst-tc-email { font-size: 11px; color: #94a3b8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aigst-tc-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.aigst-tc-status-ok   { background: #dcfce7; color: #15803d; }
.aigst-tc-status-warn { background: #fef9c3; color: #a16207; }

/* Stats row */
.aigst-tc-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
}
.aigst-tc-stat {
  text-align: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 4px 8px;
  border: 1.5px solid #e2e8f0;
  transition: border-color .2s ease, background .2s ease;
}
.aigst-tc-stat-hi {
  background: linear-gradient(135deg,#eff6ff,#dbeafe);
  border-color: #93c5fd;
}
.aigst-tc-stat span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.aigst-tc-stat-hi span { color: #1d4ed8; }
.aigst-tc-stat small {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* Progress bar */
.aigst-tc-progress-wrap { display: flex; flex-direction: column; gap: 5px; }
.aigst-tc-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.aigst-tc-progress-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.aigst-tc-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  min-width: 4px;
}
.aigst-pf-ok   { background: linear-gradient(90deg,#4ade80,#16a34a); }
.aigst-pf-warn { background: linear-gradient(90deg,#fbbf24,#d97706); }

/* Footer with WhatsApp button */
.aigst-tc-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.aigst-tc-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg,#25d366,#128c7e);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: 0 3px 10px rgba(37,211,102,.3);
}
.aigst-tc-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,211,102,.4);
  background: linear-gradient(135deg,#22c55e,#0f766e);
}
.aigst-tc-wa-btn:active { transform: scale(0.96); }

/* ── WhatsApp Modal ── */
.aigst-modal-wa { max-width: 560px; }
.aigst-modal-hdr-wa {
  background: linear-gradient(135deg,#25d366,#128c7e);
  border-radius: 20px 20px 0 0;
  padding: 18px 24px !important;
}
.aigst-modal-hdr-wa h3,
.aigst-modal-hdr-wa small,
.aigst-modal-hdr-wa .aigst-modal-x { color: #fff !important; }
.aigst-modal-hdr-wa .aigst-modal-x:hover { background: rgba(255,255,255,.2) !important; }
.aigst-wa-hdr-left { display: flex; align-items: center; gap: 14px; }
.aigst-wa-icon { font-size: 28px; }
.aigst-wa-phone-row { display: flex; flex-direction: column; gap: 5px; }
.aigst-wa-phone-row label { font-size: 13px; font-weight: 600; color: #1e293b; }
.aigst-wa-phone-wrap { display: flex; align-items: center; }
.aigst-wa-cc {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}
.aigst-wa-phone-input { border-radius: 0 10px 10px 0 !important; flex: 1; }
.aigst-wa-phone-hint { font-size: 11px; color: #94a3b8; }
.aigst-wa-textarea { font-family: monospace; font-size: 13px; line-height: 1.6; resize: vertical; min-height: 200px; }
.aigst-wa-char-count { text-align: right; font-size: 11px; color: #94a3b8; margin-top: 4px; }
.aigst-modal-foot-wa { gap: 10px; }
.aigst-wa-clear-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #e2e8f0;
}
.aigst-wa-send-btn {
  background: linear-gradient(135deg,#25d366,#128c7e);
  color: #fff;
  border: none;
  padding: 10px 22px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37,211,102,.35);
  transition: all .18s ease;
}
.aigst-wa-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
}

@media (max-width: 640px) {
  .aigst-teacher-grid { grid-template-columns: 1fr; }
  .aigst-tc-stats { grid-template-columns: repeat(2,1fr); }
  .aigst-teacher-summary-bar { gap: 8px; }
  .aigst-tsb-card { padding: 12px 14px; }
  .aigst-tsb-val { font-size: 22px; }
}
