/* ============================================================
   DIYguru Staff Portal CSS
   ============================================================ */

:root {
  --staff-primary: #0a2f26;
  --staff-primary-light: #0e4434;
  --staff-accent: #10b981;
  --staff-accent-dark: #059669;
  --staff-blue: #3b82f6;
  --staff-orange: #f59e0b;
  --staff-red: #ef4444;
  --staff-purple: #8b5cf6;
  --staff-bg: #f1f5f9;
  --staff-card: #ffffff;
  --staff-border: #e2e8f0;
  --staff-text: #0f172a;
  --staff-muted: #64748b;
  --staff-radius: 12px;
  --staff-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
  --staff-shadow-lg: 0 4px 20px rgba(0,0,0,.1);
}

/* Reset */
.staff-portal { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--staff-text); -webkit-font-smoothing: antialiased; }
.staff-portal * { box-sizing: border-box; }

/* Gate Screen */
.staff-gate { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 40px 20px; background: var(--staff-bg); }
.staff-gate-card { background: var(--staff-card); border-radius: 20px; box-shadow: var(--staff-shadow-lg); padding: 48px 40px; max-width: 440px; width: 100%; text-align: center; border: 1px solid var(--staff-border); }
.staff-gate-logo { margin-bottom: 24px; }
.staff-gate-icon { font-size: 48px; margin-bottom: 16px; }
.staff-gate-card h2 { margin: 0 0 12px; font-size: 24px; font-weight: 700; color: var(--staff-primary); }
.staff-gate-card p { color: var(--staff-muted); font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.staff-gate-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--staff-border); }
.staff-gate-footer p, .staff-gate-footer a { font-size: 13px; color: var(--staff-muted); }
.staff-gate-footer a { color: var(--staff-accent); text-decoration: none; font-weight: 500; }

/* Dashboard Layout */
.staff-dashboard { background: var(--staff-bg); min-height: 100vh; }

/* Header */
.staff-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--staff-primary); color: #fff; flex-wrap: wrap; gap: 16px; }
.staff-header-left { display: flex; align-items: center; gap: 16px; }
.staff-logo { height: 36px; }
.staff-header-title h1 { margin: 0; font-size: 18px; font-weight: 600; color: #ffffff !important; text-shadow: none; }
.staff-portal .staff-header-title h1, .staff-header .staff-header-title h1 { color: #ffffff !important; }
.staff-role-badge { display: inline-block; padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 20px; margin-top: 4px; }
.staff-role-admin { background: rgba(251,191,36,.2); color: #fbbf24; }
.staff-role-support { background: rgba(59,130,246,.2); color: #93c5fd; }
.staff-role-instructor { background: rgba(16,185,129,.2); color: #6ee7b7; }
.staff-role-trainer_limited { background: rgba(168,85,247,.2); color: #c4b5fd; } /* v3.7.33 */
.staff-header-right { display: flex; align-items: center; gap: 16px; }
.staff-user-info { display: flex; align-items: center; gap: 10px; }
.staff-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); }
.staff-user-details { display: flex; flex-direction: column; }
.staff-user-name { font-size: 14px; font-weight: 600; }
.staff-user-email { font-size: 11px; opacity: .7; }

/* Layout */
.staff-layout { display: flex; min-height: calc(100vh - 80px); }

/* Sidebar */
.staff-sidebar { width: 240px; background: var(--staff-card); border-right: 1px solid var(--staff-border); padding: 16px 0; flex-shrink: 0; }
.staff-sidebar-toggle { display: none; }
.staff-nav { display: flex; flex-direction: column; }
.staff-nav-divider { height: 1px; background: var(--staff-border); margin: 8px 16px; }
.staff-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: none; border: none; cursor: pointer; font-size: 14px; color: var(--staff-muted); text-align: left; transition: all .15s ease; width: 100%; }
.staff-nav-item:hover { background: var(--staff-bg); color: var(--staff-text); }
.staff-nav-item.active { background: linear-gradient(90deg, rgba(16,185,129,.1), transparent); color: var(--staff-accent); border-left: 3px solid var(--staff-accent); font-weight: 600; }
.staff-nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.staff-nav-icon svg { width: 100%; height: 100%; }

/* Main Content */
.staff-main { flex: 1; padding: 24px; overflow-y: auto; }
.staff-content-loading { text-align: center; padding: 60px 20px; color: var(--staff-muted); }

/* Section Headers */
.staff-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.staff-section-header h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--staff-primary); }
.staff-section-header .staff-btn { flex-shrink: 0; }
.staff-subtitle { color: var(--staff-muted); margin: 4px 0 24px; font-size: 14px; }

/* Buttons */
.staff-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .15s ease; white-space: nowrap; min-width: fit-content; }
.staff-btn-primary { background: var(--staff-accent); color: #fff; }
.staff-btn-primary:hover { background: var(--staff-accent-dark); }
.staff-btn-outline { background: transparent; border: 1.5px solid var(--staff-border); color: var(--staff-text); }
.staff-btn-outline:hover { border-color: var(--staff-accent); color: var(--staff-accent); }
.staff-btn-sm { padding: 8px 14px; font-size: 13px; white-space: nowrap; min-width: fit-content; }
.staff-btn-logout { background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.3); color: #fff; }
.staff-btn-logout:hover { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.5); color: #fff; }
.staff-btn-green { background: #10b981; color: #fff; }
.staff-btn-green:hover { background: #059669; }
.staff-btn-red { background: #ef4444; color: #fff; }
.staff-btn-red:hover { background: #dc2626; }
.staff-btn-whatsapp { background: #25d366; color: #fff; }
.staff-btn-whatsapp:hover { background: #128c7e; }

/* Stats Grid */
.staff-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.staff-stat-card { background: var(--staff-card); border-radius: var(--staff-radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--staff-shadow); border: 1px solid var(--staff-border); }
.staff-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.staff-stat-icon svg { width: 24px; height: 24px; }
.staff-stat-blue .staff-stat-icon { background: rgba(59,130,246,.1); color: var(--staff-blue); }
.staff-stat-orange .staff-stat-icon { background: rgba(245,158,11,.1); color: var(--staff-orange); }
.staff-stat-green .staff-stat-icon { background: rgba(16,185,129,.1); color: var(--staff-accent); }
.staff-stat-purple .staff-stat-icon { background: rgba(139,92,246,.1); color: var(--staff-purple); }
.staff-stat-content { display: flex; flex-direction: column; }
.staff-stat-value { font-size: 28px; font-weight: 700; color: var(--staff-text); line-height: 1; }
.staff-stat-label { font-size: 13px; color: var(--staff-muted); margin-top: 4px; }

/* Quick Actions */
.staff-quick-actions { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); margin-bottom: 24px; }
.staff-quick-actions h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.staff-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.staff-action-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; background: var(--staff-bg); border: 1px solid var(--staff-border); border-radius: 10px; cursor: pointer; transition: all .15s ease; }
.staff-action-btn:hover { background: #fff; border-color: var(--staff-accent); }
.staff-action-btn svg { width: 24px; height: 24px; color: var(--staff-accent); }
.staff-action-btn span { font-size: 13px; font-weight: 500; color: var(--staff-text); }

/* Team Overview */
.staff-team-overview { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); }
.staff-team-overview h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.staff-team-stats { display: flex; gap: 32px; }
.staff-team-stat { text-align: center; }
.staff-team-count { display: block; font-size: 32px; font-weight: 700; color: var(--staff-primary); }
.staff-team-label { font-size: 13px; color: var(--staff-muted); }

/* Tables */
.staff-table-container { background: var(--staff-card); border-radius: var(--staff-radius); box-shadow: var(--staff-shadow); overflow: hidden; }
.staff-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.staff-table thead { background: var(--staff-bg); }
.staff-table th { text-align: left; padding: 14px 16px; font-size: 12px; font-weight: 600; color: var(--staff-muted); text-transform: uppercase; letter-spacing: .5px; }
.staff-table td { padding: 14px 16px; border-bottom: 1px solid var(--staff-border); vertical-align: middle; }
.staff-table tbody tr:hover { background: #f8fafc; }
.staff-table tbody tr:last-child td { border-bottom: none; }

/* Table Cells */
.staff-cell-subject { max-width: 200px; }
.staff-cell-sub { display: block; font-size: 12px; color: var(--staff-muted); }
.staff-user-cell { display: flex; align-items: center; gap: 10px; }
.staff-mini-avatar { width: 32px; height: 32px; border-radius: 50%; }

/* Table action columns - ensure buttons don't shrink */
.staff-table td:last-child { white-space: nowrap; }
.staff-table td .staff-btn { flex-shrink: 0; }
.staff-table .staff-btn + .staff-btn { margin-left: 6px; }

/* Badges */
.staff-badge { display: inline-block; padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 6px; }
.staff-badge-open { background: #dbeafe; color: #1e40af; }
.staff-badge-in_progress { background: #fef3c7; color: #92400e; }
.staff-badge-resolved { background: #d1fae5; color: #065f46; }
.staff-badge-closed { background: #f3f4f6; color: #6b7280; }
.staff-badge-scheduled { background: #dbeafe; color: #1e40af; }
.staff-badge-completed { background: #d1fae5; color: #065f46; }
.staff-badge-green { background: #d1fae5; color: #065f46; }
.staff-badge-purple { background: #ede9fe; color: #6d28d9; }
.staff-badge-gray { background: #f3f4f6; color: #6b7280; }

/* Mini Stats */
.staff-mini-stats { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.staff-mini-stat { padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.staff-mini-stat:hover { transform: scale(1.05); }
.staff-stat-open { background: #dbeafe; color: #1e40af; }
.staff-stat-progress { background: #fef3c7; color: #92400e; }
.staff-stat-resolved { background: #d1fae5; color: #065f46; }
.staff-stat-closed { background: #f3f4f6; color: #6b7280; }

/* Filters */
.staff-filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.staff-filters select, .staff-filters input { padding: 10px 14px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: #fff; }
.staff-filters input { min-width: 200px; }

/* Search Box */
.staff-search-card { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); margin-bottom: 24px; border: 1px solid var(--staff-border); }
.staff-search-box { display: flex; gap: 12px; }
.staff-search-input { flex: 1; padding: 14px 18px; border: 1.5px solid var(--staff-border); border-radius: 10px; font-size: 15px; background: var(--staff-bg); }
.staff-search-input:focus { outline: none; border-color: var(--staff-accent); background: #fff; }
.staff-search-tip { margin: 12px 0 0; font-size: 13px; color: var(--staff-muted); }
.staff-results-container { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); border: 1px solid var(--staff-border); min-height: 200px; }
.staff-results-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: var(--staff-muted); }
.staff-results-placeholder svg { margin-bottom: 16px; opacity: 0.4; }
.staff-results-placeholder p { margin: 0; font-size: 15px; }
.staff-loading { text-align: center; padding: 40px 20px; color: var(--staff-muted); }

/* Forms */
.staff-form-card { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); margin-bottom: 24px; }
.staff-form-card h3 { margin: 0 0 20px; font-size: 18px; font-weight: 600; }
.staff-form-row { margin-bottom: 16px; }
.staff-form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--staff-text); margin-bottom: 6px; }
.staff-form-row label .required { color: var(--staff-red); }
.staff-form-row input, .staff-form-row select, .staff-form-row textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--staff-border); border-radius: 8px; font-size: 14px; }
.staff-form-row input:focus, .staff-form-row select:focus, .staff-form-row textarea:focus { outline: none; border-color: var(--staff-accent); }
.staff-form-actions { display: flex; gap: 12px; margin-top: 20px; }

/* Utilities */
.staff-empty { text-align: center; padding: 40px 20px; color: var(--staff-muted); }
.staff-hint { color: var(--staff-muted); font-size: 14px; }
.staff-results-count { margin: 16px 0 0; font-size: 13px; color: var(--staff-muted); text-align: right; }
.staff-cell-sub { display: block; font-size: 12px; color: var(--staff-muted); margin-top: 2px; }
.staff-muted { color: var(--staff-muted); }
.staff-loading { text-align: center; padding: 40px; color: var(--staff-muted); }

/* Inline spinner for .staff-loading — without this every async tab renders as
   plain "Loading..." text and users think the UI froze. */
.staff-loading::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2.5px solid var(--staff-border);
  border-top-color: var(--staff-accent);
  animation: staff-spin .72s linear infinite;
}
@keyframes staff-spin { to { transform: rotate(360deg); } }

/* Coming Soon */
.staff-coming-soon-card { text-align: center; padding: 80px 40px; background: var(--staff-card); border-radius: var(--staff-radius); box-shadow: var(--staff-shadow); }
.staff-coming-soon-icon { font-size: 64px; margin-bottom: 16px; }
.staff-coming-soon-card h2 { margin: 0 0 12px; color: var(--staff-primary); }
.staff-coming-soon-card p { color: var(--staff-muted); }

/* Progress Bar */
.staff-progress-bar { position: relative; background: #e5e7eb; border-radius: 4px; height: 24px; width: 120px; overflow: hidden; }
.staff-progress-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, var(--staff-accent), #34d399); border-radius: 4px; }
.staff-progress-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 11px; font-weight: 600; color: var(--staff-text); }

/* Risk Tabs (card-style) */
.staff-risk-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.staff-risk-tabs .staff-tab { padding: 10px 20px; background: var(--staff-bg); border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--staff-text); cursor: pointer; transition: all .15s ease; }
.staff-risk-tabs .staff-tab:hover { border-color: var(--staff-accent); color: var(--staff-accent); }
.staff-risk-tabs .staff-tab.active { background: var(--staff-accent); color: #fff; border-color: var(--staff-accent); }
.staff-tab-content { display: none; }
.staff-tab-content.active { display: block; }

/* Analytics Cards */
.staff-analytics-card { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); margin-bottom: 24px; }
.staff-analytics-card h3 { margin: 0 0 20px; font-size: 16px; font-weight: 600; color: var(--staff-primary); }

/* Stats Grid Variations */
.staff-stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.staff-stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.staff-stat-large .staff-stat-value { font-size: 40px; }
.staff-stat-large .staff-stat-content small { font-size: 12px; color: var(--staff-muted); display: block; margin-top: 4px; }
.staff-stat-red { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fecaca; }
.staff-stat-red .staff-stat-value { color: var(--staff-red); }

/* Stat List */
.staff-stat-list { list-style: none; padding: 0; margin: 0; }
.staff-stat-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--staff-border); }
.staff-stat-list li:last-child { border-bottom: none; }
.staff-stat-list li span { color: var(--staff-muted); font-size: 14px; }
.staff-stat-list li strong { font-size: 15px; }

/* Bar Chart */
.staff-bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 20px 0; }
.staff-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; }
.staff-bar { width: 100%; max-width: 60px; background: linear-gradient(180deg, var(--staff-accent), #34d399); border-radius: 6px 6px 0 0; min-height: 10px; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.staff-bar-value { position: absolute; top: -24px; font-size: 12px; font-weight: 600; color: var(--staff-text); }
.staff-bar-label { margin-top: 8px; font-size: 12px; color: var(--staff-muted); }

/* Grid */
.staff-grid { display: grid; gap: 24px; }
.staff-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Trainer Performance */
.staff-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.staff-star { color: #f59e0b; }

/* Batch Health Cards */
.staff-batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.staff-batch-card { background: var(--staff-card); border-radius: var(--staff-radius); padding: 20px; box-shadow: var(--staff-shadow); border-left: 4px solid var(--staff-accent); }
.staff-batch-good { border-left-color: var(--staff-accent); }
.staff-batch-warning { border-left-color: var(--staff-orange); }
.staff-batch-critical { border-left-color: var(--staff-red); }
.staff-batch-header h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.staff-batch-program { font-size: 12px; color: var(--staff-muted); }
.staff-batch-stats { display: flex; gap: 20px; margin: 16px 0; }
.staff-batch-stat { text-align: center; }
.staff-batch-stat .stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--staff-primary); }
.staff-batch-stat .stat-label { font-size: 11px; color: var(--staff-muted); text-transform: uppercase; }
.staff-batch-health { display: flex; align-items: center; gap: 10px; }
.staff-health-label { font-size: 12px; color: var(--staff-muted); }
.staff-health-bar { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.staff-health-fill { height: 100%; background: var(--staff-accent); border-radius: 4px; }
.staff-batch-good .staff-health-fill { background: var(--staff-accent); }
.staff-batch-warning .staff-health-fill { background: var(--staff-orange); }
.staff-batch-critical .staff-health-fill { background: var(--staff-red); }
.staff-health-value { font-size: 13px; font-weight: 600; }

/* Feedback List */
.staff-feedback-list { display: flex; flex-direction: column; gap: 16px; }
.staff-feedback-item { padding: 16px; background: var(--staff-bg); border-radius: 10px; border-left: 3px solid var(--staff-accent); }
.staff-feedback-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.staff-feedback-rating { display: flex; gap: 2px; }
.staff-feedback-rating .star-filled { color: #f59e0b; }
.staff-feedback-rating .star-empty { color: #d1d5db; }
.staff-feedback-meta { font-size: 12px; color: var(--staff-muted); }
.staff-feedback-comment { margin: 0; font-size: 14px; color: var(--staff-text); line-height: 1.5; }

/* Report Cards */
.staff-reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.staff-report-card { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; background: var(--staff-card); border-radius: var(--staff-radius); box-shadow: var(--staff-shadow); border: 1px solid var(--staff-border); text-decoration: none; transition: all .15s ease; }
.staff-report-card:hover { transform: translateY(-2px); box-shadow: var(--staff-shadow-lg); border-color: var(--staff-accent); }
.staff-report-icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--staff-accent); }
.staff-report-icon svg { width: 100%; height: 100%; }
.staff-report-card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--staff-primary); }
.staff-report-card p { margin: 0; font-size: 13px; color: var(--staff-muted); }

/* Extra Badges */
.staff-badge-red { background: #fee2e2; color: #991b1b; }
.staff-badge-orange { background: #fef3c7; color: #92400e; }
.staff-badge-pending { background: #fef3c7; color: #92400e; }
.staff-badge-approved { background: #d1fae5; color: #065f46; }
.staff-badge-rejected { background: #fee2e2; color: #991b1b; }

/* WhatsApp Button */
.staff-btn-whatsapp { background: #25d366; color: #fff; }
.staff-btn-whatsapp:hover { background: #128c7e; color: #fff; }

/* Button Colors */
.staff-btn-green { background: var(--staff-accent); color: #fff; }
.staff-btn-green:hover { background: var(--staff-accent-dark); }
.staff-btn-red { background: var(--staff-red); color: #fff; }
.staff-btn-red:hover { background: #dc2626; }

/* Cell Wrap */
.staff-cell-wrap { max-width: 200px; white-space: normal; word-break: break-word; }

/* Checkbox in forms */
.staff-form-row label input[type="checkbox"] { width: auto; margin-right: 8px; vertical-align: middle; }

/* Actions Cell */
.staff-actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   STUDENT PROFILE MODAL
   ============================================================ */

/* Modal Base */
.staff-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.staff-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.staff-modal-container { position: relative; background: var(--staff-card); border-radius: 16px; width: 95%; max-width: 1100px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.staff-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--staff-border); }
.staff-modal-header h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--staff-primary); }
.staff-modal-close { background: none; border: none; font-size: 28px; color: var(--staff-muted); cursor: pointer; line-height: 1; padding: 0 8px; }
.staff-modal-close:hover { color: var(--staff-text); }
.staff-modal-body { padding: 24px; overflow-y: auto; flex: 1; }
body.staff-modal-open { overflow: hidden; }

/* Student Profile */
.student-profile { }

/* Profile Header */
.sp-header { display: flex; align-items: center; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--staff-border); margin-bottom: 24px; flex-wrap: wrap; }
.sp-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.sp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-avatar-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--staff-accent), var(--staff-primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; }
.sp-header-info { flex: 1; min-width: 200px; }
.sp-header-info h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: var(--staff-text); }
.sp-student-id { color: var(--staff-muted); font-size: 14px; margin: 0 0 8px; }
.sp-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Quick Stats */
.sp-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.sp-stat-card { background: var(--staff-bg); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.sp-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.sp-stat-blue { background: rgba(59,130,246,0.15); color: var(--staff-blue); }
.sp-stat-green { background: rgba(16,185,129,0.15); color: var(--staff-accent); }
.sp-stat-purple { background: rgba(139,92,246,0.15); color: var(--staff-purple); }
.sp-stat-orange { background: rgba(245,158,11,0.15); color: var(--staff-orange); }
.sp-stat-content { display: flex; flex-direction: column; }
.sp-stat-value { font-size: 22px; font-weight: 700; color: var(--staff-text); }
.sp-stat-label { font-size: 12px; color: var(--staff-muted); }

/* Tabs */
.sp-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--staff-border); margin-bottom: 20px; overflow-x: auto; }
.sp-tab { background: none; border: none; padding: 12px 20px; font-size: 14px; font-weight: 500; color: var(--staff-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: all 0.15s ease; }
.sp-tab:hover { color: var(--staff-text); }
.sp-tab.active { color: var(--staff-accent); border-bottom-color: var(--staff-accent); font-weight: 600; }

/* Tab Contents */
.sp-tab-contents { }
.sp-tab-content { display: none; }
.sp-tab-content.active { display: block; }

/* Info Grid (Profile Tab) */
.sp-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sp-info-section { background: var(--staff-bg); border-radius: 12px; padding: 20px; }
.sp-info-section h4 { margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--staff-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.sp-info-rows { }
.sp-info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.sp-info-row:last-child { border-bottom: none; }
.sp-info-label { color: var(--staff-muted); font-size: 13px; }
.sp-info-value { color: var(--staff-text); font-size: 13px; font-weight: 500; text-align: right; max-width: 60%; }
.sp-info-value a { color: var(--staff-accent); text-decoration: none; }
.sp-info-value a:hover { text-decoration: underline; }

/* Career Objective */
.sp-career-objective { background: var(--staff-bg); border-radius: 12px; padding: 20px; margin-top: 24px; }
.sp-career-objective h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--staff-primary); }
.sp-career-objective p { margin: 0; color: var(--staff-text); line-height: 1.6; }

/* Viva Section */
.sp-viva-section { margin-top: 24px; }
.sp-viva-section h4 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }

/* Courses Grid */
.sp-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.sp-course-card { background: var(--staff-bg); border-radius: 12px; padding: 16px; }
.sp-course-header { margin-bottom: 12px; }
.sp-course-header h5 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--staff-text); }
.sp-course-code { font-size: 12px; color: var(--staff-muted); }
.sp-course-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sp-progress-bar { flex: 1; height: 8px; background: rgba(0,0,0,0.1); border-radius: 4px; overflow: hidden; }
.sp-progress-fill { height: 100%; background: linear-gradient(90deg, var(--staff-accent), #34d399); border-radius: 4px; transition: width 0.3s ease; }
.sp-progress-text { font-size: 14px; font-weight: 600; color: var(--staff-text); min-width: 40px; }
.sp-course-meta { }

/* Attendance Summary */
.sp-attendance-summary { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.sp-att-stat { background: var(--staff-bg); border-radius: 12px; padding: 16px 24px; text-align: center; flex: 1; min-width: 100px; }
.sp-att-value { display: block; font-size: 28px; font-weight: 700; color: var(--staff-text); }
.sp-att-label { display: block; font-size: 12px; color: var(--staff-muted); margin-top: 4px; }
.sp-att-present .sp-att-value { color: var(--staff-accent); }
.sp-att-absent .sp-att-value { color: var(--staff-red); }

/* Feedback List */
.sp-feedback-list { display: flex; flex-direction: column; gap: 16px; }
.sp-feedback-item { background: var(--staff-bg); border-radius: 12px; padding: 16px; }
.sp-feedback-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.sp-feedback-rating { color: #fbbf24; font-size: 16px; }
.sp-feedback-rating .star-empty { color: #d1d5db; }
.sp-feedback-meta { font-size: 12px; color: var(--staff-muted); }
.sp-feedback-comment { margin: 0; color: var(--staff-text); font-size: 14px; line-height: 1.5; }

/* Star ratings */
.star-filled { color: #fbbf24; }
.star-empty { color: #d1d5db; }

/* Badge colors */
.staff-badge-blue { background: rgba(59,130,246,0.15); color: var(--staff-blue); }
.staff-badge-purple { background: rgba(139,92,246,0.15); color: var(--staff-purple); }
.staff-badge-red { background: rgba(239,68,68,0.15); color: var(--staff-red); }
.staff-badge-gray { background: rgba(100,116,139,0.15); color: var(--staff-muted); }

/* Tabs (underline-style) */
.staff-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--staff-border); margin-bottom: 20px; background: var(--staff-card); }
.staff-tabs .staff-tab { background: none; border: none; padding: 12px 20px; font-size: 14px; font-weight: 500; color: #374151; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 8px; transition: all 0.15s ease; }
.staff-tabs .staff-tab:hover { color: var(--staff-primary); }
.staff-tabs .staff-tab.active { color: var(--staff-accent); border-bottom-color: var(--staff-accent); font-weight: 600; }
.staff-tab-badge { background: var(--staff-orange); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }

/* Empty State */
.staff-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--staff-muted); background: var(--staff-bg); border-radius: 12px; }
.staff-empty-state svg { margin-bottom: 16px; opacity: 0.5; color: var(--staff-accent); }
.staff-empty-state p { margin: 0; font-size: 15px; }

/* Evaluator name styling */
.staff-evaluator { font-weight: 500; color: var(--staff-text); }

/* View submission link */
.staff-view-link { display: inline-flex; align-items: center; margin-left: 8px; color: var(--staff-muted); transition: color 0.15s ease; }
.staff-view-link:hover { color: var(--staff-accent); }
.staff-view-link svg { vertical-align: middle; }

/* ============================================================
   PROJECT EVALUATION FORM
   ============================================================ */

/* Evaluation Modal Layout */
.eval-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.eval-submission { border-right: 1px solid var(--staff-border); padding-right: 24px; }
.eval-form-section { }

.eval-info-header { background: var(--staff-bg); border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.eval-info-header p { margin: 0 0 8px; font-size: 14px; }
.eval-info-header p:last-child { margin-bottom: 0; }

.eval-submission h4, .eval-form-section h4 { font-size: 15px; font-weight: 600; color: var(--staff-primary); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--staff-border); }

.eval-submission-content { margin-bottom: 20px; }
.submission-text-box { background: #fff; border: 1px solid var(--staff-border); border-radius: 8px; padding: 16px; min-height: 150px; max-height: 300px; overflow-y: auto; font-size: 14px; line-height: 1.6; }
.submission-content { white-space: pre-wrap; word-wrap: break-word; }
.submission-empty { color: var(--staff-muted); font-style: italic; }

.eval-submission-files { margin-top: 16px; }
.files-list { display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--staff-bg); border: 1px solid var(--staff-border); border-radius: 8px; text-decoration: none; color: var(--staff-text); transition: all 0.15s ease; }
.file-item:hover { border-color: var(--staff-accent); background: #fff; }
.file-icon { color: var(--staff-accent); flex-shrink: 0; }
.file-name { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-download { font-size: 12px; color: var(--staff-accent); font-weight: 600; flex-shrink: 0; }

/* Legacy eval-info support */
.eval-info { background: var(--staff-bg); border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.eval-info p { margin: 0 0 8px; font-size: 14px; }
.eval-info p:last-child { margin-bottom: 0; }

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .eval-layout { grid-template-columns: 1fr; }
  .eval-submission { border-right: none; border-bottom: 1px solid var(--staff-border); padding-right: 0; padding-bottom: 20px; margin-bottom: 20px; }
}

.staff-form-row { margin-bottom: 20px; }
.staff-form-row label { display: block; font-size: 14px; font-weight: 600; color: var(--staff-text); margin-bottom: 8px; }
.staff-form-row label .required { color: var(--staff-red); }
.staff-form-row input, .staff-form-row select, .staff-form-row textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: #fff; transition: border-color 0.15s ease; }
.staff-form-row input:focus, .staff-form-row select:focus, .staff-form-row textarea:focus { outline: none; border-color: var(--staff-accent); }
.staff-form-row textarea { resize: vertical; min-height: 100px; }

.score-input-wrapper { display: flex; align-items: center; gap: 12px; }
.score-input-wrapper input { width: 120px; text-align: center; font-size: 18px; font-weight: 600; }
.score-max { font-size: 16px; color: var(--staff-muted); }

.staff-form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--staff-border); }

.eval-success { background: rgba(16,185,129,0.1); color: #059669; padding: 12px 16px; border-radius: 8px; margin-top: 16px; font-weight: 500; }
.eval-error { background: rgba(239,68,68,0.1); color: #dc2626; padding: 12px 16px; border-radius: 8px; margin-top: 16px; font-weight: 500; }

/* Evaluation Logs */
.eval-logs h3 { font-size: 16px; font-weight: 600; color: var(--staff-primary); margin: 0 0 16px; }

/* ============================================================
   CLASS SCHEDULING
   ============================================================ */

/* Form Card */
.staff-form-card { background: var(--staff-card); border-radius: var(--staff-radius); padding: 24px; box-shadow: var(--staff-shadow); border: 1px solid var(--staff-border); margin-bottom: 24px; }
.staff-form-card h3 { margin: 0 0 20px; font-size: 18px; font-weight: 600; color: var(--staff-primary); }

/* Form Grid */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Batch Checkboxes */
.batch-checkboxes { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; background: var(--staff-bg); border-radius: 8px; max-height: 150px; overflow-y: auto; }
.batch-checkbox { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-radius: 6px; border: 1px solid var(--staff-border); cursor: pointer; transition: all 0.15s ease; }
.batch-checkbox:hover { border-color: var(--staff-accent); }
.batch-checkbox input { margin: 0; }
.batch-checkbox span { font-size: 13px; }
.batch-checkbox small { color: var(--staff-muted); }
.batch-checkbox input:checked + span { color: var(--staff-accent); font-weight: 500; }

/* Selected Batches Display */
.selected-batches-display { animation: fadeIn 0.2s ease; }
#batch-checkboxes-container { scrollbar-width: thin; scrollbar-color: var(--staff-accent) var(--staff-bg); }
#batch-checkboxes-container::-webkit-scrollbar { width: 6px; }
#batch-checkboxes-container::-webkit-scrollbar-track { background: var(--staff-bg); border-radius: 3px; }
#batch-checkboxes-container::-webkit-scrollbar-thumb { background: var(--staff-accent); border-radius: 3px; }
#batch-search-input:focus { outline: none; border-color: var(--staff-accent); box-shadow: 0 0 0 3px rgba(16,185,129,.1); }

/* Checkbox Label */
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.checkbox-label input { width: auto; margin: 0; }

/* Filter Cards */
.class-filter-card { cursor: pointer; transition: all 0.15s ease; border: 2px solid transparent; }
.class-filter-card:hover { transform: translateY(-2px); }
.class-filter-card.active { border-color: var(--staff-accent); }

/* Classes Grid */
.classes-grid { display: flex; flex-direction: column; gap: 12px; }

/* Date Header */
.class-date-header { display: flex; align-items: center; gap: 12px; padding: 16px 0 8px; border-bottom: 1px solid var(--staff-border); margin-top: 16px; }
.class-date-header:first-child { margin-top: 0; }
.class-date-day { font-size: 16px; font-weight: 600; color: var(--staff-text); }
.class-date-full { font-size: 14px; color: var(--staff-muted); }
.class-date-badge { background: var(--staff-accent); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; }

/* Class Card */
.class-card { display: flex; align-items: center; gap: 20px; padding: 16px; background: var(--staff-card); border-radius: 10px; border: 1px solid var(--staff-border); transition: all 0.15s ease; }
.class-card:hover { box-shadow: var(--staff-shadow); }
.class-card-today { border-left: 4px solid var(--staff-accent); background: linear-gradient(90deg, rgba(16,185,129,0.05), transparent); }
.class-card-past { opacity: 0.6; }

.class-card-time { display: flex; flex-direction: column; align-items: center; min-width: 80px; padding-right: 20px; border-right: 1px solid var(--staff-border); }
.class-time-start { font-size: 16px; font-weight: 600; color: var(--staff-text); }
.class-time-sep { font-size: 12px; color: var(--staff-muted); }
.class-time-end { font-size: 14px; color: var(--staff-muted); }

.class-card-content { flex: 1; }
.class-card-content h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--staff-text); }
.class-topic { margin: 0 0 8px; font-size: 13px; color: var(--staff-muted); }
.class-meta { display: flex; align-items: center; gap: 16px; }
.class-instructor { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--staff-muted); }
.class-instructor svg { opacity: 0.6; }

.class-card-actions { display: flex; align-items: center; gap: 8px; }
.class-no-link { font-size: 13px; color: var(--staff-muted); font-style: italic; }

/* Copy Button */
.btn-copy-link { position: relative; }
.btn-copy-link.copied::after { content: 'Copied!'; position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: var(--staff-primary); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 4px; white-space: nowrap; }

/* =========================================
   ATTENDANCE SECTION
   ========================================= */

.staff-section-attendance .staff-subtitle { color: var(--staff-muted); margin: 0 0 20px; font-size: 14px; }

/* Attendance Sessions Grid */
.attendance-sessions-grid { display: flex; flex-direction: column; gap: 12px; }

.attendance-session-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 10px; transition: all 0.15s ease; }
.attendance-session-card:hover { box-shadow: var(--staff-shadow); }
.attendance-session-card.today { border-left: 4px solid var(--staff-accent); background: linear-gradient(90deg, rgba(16,185,129,0.05), transparent); }
.attendance-session-card.marked { background: rgba(16,185,129,0.03); }

.att-session-date { display: flex; flex-direction: column; align-items: center; min-width: 60px; padding-right: 16px; border-right: 1px solid var(--staff-border); }
.att-session-date .att-day { font-size: 22px; font-weight: 700; color: var(--staff-text); line-height: 1.1; }
.att-session-date .att-month { font-size: 12px; color: var(--staff-muted); text-transform: uppercase; }
.att-session-date .att-today-badge { margin-top: 4px; background: var(--staff-accent); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }

.att-session-info { flex: 1; }
.att-session-info h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--staff-text); }
.att-session-info .att-topic { margin: 0 0 6px; font-size: 13px; color: var(--staff-muted); }
.att-session-info .att-meta { display: flex; gap: 16px; font-size: 12px; color: var(--staff-muted); }

.att-session-status { min-width: 80px; text-align: center; }
.att-marked-info { display: flex; flex-direction: column; align-items: center; }
.att-marked-count { font-size: 18px; font-weight: 600; color: var(--staff-accent); }
.att-marked-label { font-size: 11px; color: var(--staff-muted); }
.att-not-marked { font-size: 12px; color: var(--staff-orange); font-weight: 500; }

.att-session-action { min-width: 70px; }

/* Attendance Rate Bar */
.att-rate-bar { position: relative; height: 20px; background: var(--staff-bg); border-radius: 10px; overflow: hidden; min-width: 80px; }
.att-rate-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, var(--staff-accent), #34d399); border-radius: 10px; }
.att-rate-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 11px; font-weight: 600; color: var(--staff-text); }

/* Attendance Modal */
.attendance-students-list { max-height: 60vh; overflow-y: auto; }

.attendance-actions-top { display: flex; gap: 10px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--staff-border); }

.attendance-student-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.attendance-student-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--staff-bg); border-radius: 8px; }

.att-student-info { display: flex; align-items: center; gap: 12px; }
.att-student-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--staff-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.att-student-details { display: flex; flex-direction: column; }
.att-student-name { font-size: 14px; font-weight: 500; color: var(--staff-text); }
.att-student-id { font-size: 12px; color: var(--staff-muted); }

.att-student-status { display: flex; gap: 12px; }

.att-radio { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.att-radio input { display: none; }
.att-radio-label { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; border: 2px solid var(--staff-border); transition: all 0.15s ease; }
.att-radio input:checked + .att-radio-label { border-color: transparent; color: #fff; }
.att-radio-present input:checked + .att-radio-label { background: var(--staff-accent); }
.att-radio-absent input:checked + .att-radio-label { background: var(--staff-red); }
.att-radio-label:hover { border-color: var(--staff-muted); }

/* =========================================
   TICKET DETAIL & REPLIES
   ========================================= */

.ticket-detail { padding: 0; }

.ticket-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ticket-header-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ticket-number { font-family: monospace; font-size: 14px; font-weight: 600; color: var(--staff-primary); background: rgba(10,47,38,0.08); padding: 4px 10px; border-radius: 4px; }
.ticket-header-actions select { padding: 8px 12px; border: 1px solid var(--staff-border); border-radius: 6px; font-size: 13px; background: var(--staff-card); }

.ticket-detail h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; color: var(--staff-text); }

.ticket-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--staff-muted); margin-bottom: 16px; }
.ticket-meta strong { color: var(--staff-text); }

.ticket-message { background: var(--staff-bg); padding: 16px; border-radius: 8px; font-size: 14px; line-height: 1.6; color: var(--staff-text); margin-bottom: 24px; }

/* Ticket Replies */
.ticket-replies { margin-bottom: 24px; }
.ticket-replies h4 { margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--staff-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.ticket-reply { padding: 14px; border-radius: 8px; margin-bottom: 12px; }
.ticket-reply.staff-reply { background: rgba(16,185,129,0.08); border-left: 3px solid var(--staff-accent); }
.ticket-reply.student-reply { background: var(--staff-bg); border-left: 3px solid var(--staff-blue); }

.reply-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.reply-author { font-size: 13px; font-weight: 600; color: var(--staff-text); }
.reply-time { font-size: 12px; color: var(--staff-muted); }

.reply-content { font-size: 14px; line-height: 1.6; color: var(--staff-text); }

/* Reply Form */
.ticket-reply-form h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--staff-text); }
.ticket-reply-form textarea { width: 100%; padding: 12px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; resize: vertical; font-family: inherit; }
.ticket-reply-form textarea:focus { outline: none; border-color: var(--staff-accent); }

.ticket-closed-notice { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); padding: 14px; border-radius: 8px; text-align: center; }
.ticket-closed-notice p { margin: 0; font-size: 14px; color: var(--staff-red); }

/* Ticket Modal */
#ticket-modal .staff-modal-container { max-width: 700px; }

/* Success/Error Messages */
.staff-success { color: var(--staff-accent); background: rgba(16,185,129,0.1); padding: 10px 14px; border-radius: 6px; margin-top: 12px; font-size: 14px; }
.staff-error { color: var(--staff-red); background: rgba(239,68,68,0.1); padding: 10px 14px; border-radius: 6px; margin-top: 12px; font-size: 14px; }

/* =========================================
   SESSIONS MANAGEMENT
   ========================================= */

.staff-header-subtitle { color: var(--staff-muted); font-size: 14px; margin: 4px 0 0; }

.sessions-manage-grid { display: flex; flex-direction: column; gap: 16px; }

.session-manage-card { background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 12px; overflow: hidden; transition: box-shadow 0.15s ease; }
.session-manage-card:hover { box-shadow: var(--staff-shadow); }
.session-manage-card.cancelled { opacity: 0.7; border-color: #fecaca; }
.session-manage-card.past { background: rgba(241,245,249,0.5); }

/* Toggle Switch Styles */
.staff-toggle-label { font-size: 14px; color: var(--staff-text); user-select: none; }
.staff-toggle-input { opacity: 0; width: 0; height: 0; position: absolute; }
.staff-toggle-switch { display: inline-block; width: 40px; height: 22px; background: #cbd5e1; border-radius: 11px; position: relative; transition: background 0.2s ease; }
.staff-toggle-switch::after { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: transform 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.staff-toggle-input:checked + .staff-toggle-switch { background: var(--staff-accent); }
.staff-toggle-input:checked + .staff-toggle-switch::after { transform: translateX(18px); }

/* Checkbox Label Styles */
.staff-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--staff-text); }
.staff-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--staff-accent); cursor: pointer; }

/* Form Grid */
.staff-form-grid { display: grid; gap: 12px; }
.staff-form-grid .staff-form-row { margin: 0; }

/* Info Text Box */
.staff-info-text { font-size: 14px; color: var(--staff-text); }
.staff-info-text strong { color: var(--staff-primary); }

/* Form Help Text */
.form-help { display: block; font-size: 12px; color: var(--staff-muted); margin-top: 4px; }

/* Required Asterisk */
.required { color: var(--staff-red); }

/* =========================================
   SESSIONS TABLE LAYOUT (v3.3.3)
   ========================================= */

/* Week Tabs */
.sessions-week-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sessions-tab { padding: 10px 16px; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--staff-muted); cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; gap: 8px; }
.sessions-tab:hover { background: var(--staff-bg); color: var(--staff-text); }
.sessions-tab.active { background: var(--staff-primary); color: #fff; border-color: var(--staff-primary); }
.sessions-tab .tab-count { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 12px; font-size: 11px; }
.sessions-tab.active .tab-count { background: rgba(255,255,255,0.3); }

/* Table Wrapper */
.sessions-table-wrapper { background: var(--staff-card); border-radius: 12px; border: 1px solid var(--staff-border); overflow-x: auto; }

/* Sessions Table */
.sessions-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1000px; }
.sessions-table th { background: var(--staff-bg); padding: 12px 10px; text-align: left; font-weight: 600; color: var(--staff-text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 2px solid var(--staff-border); white-space: nowrap; }
.sessions-table td { padding: 12px 10px; border-bottom: 1px solid var(--staff-border); vertical-align: middle; }
.sessions-table tbody tr:hover { background: rgba(16,185,129,0.03); }
.sessions-table tbody tr.cancelled { opacity: 0.6; background: #fef2f2; }
.sessions-table tbody tr.cancelled:hover { background: #fef2f2; }

/* Column widths */
.col-session { min-width: 180px; }
.col-batches { min-width: 140px; }
.col-batch-start { min-width: 80px; }
.col-datetime { min-width: 130px; }
.col-instructor { min-width: 120px; }
.col-link { min-width: 90px; }
.col-status { min-width: 110px; }
.col-desc { min-width: 150px; max-width: 200px; }
.col-actions { min-width: 140px; }

/* Session Name Cell */
.session-name-cell { display: flex; flex-direction: column; gap: 2px; }
.session-name-cell strong { color: var(--staff-text); font-size: 13px; }
.session-name-cell .session-topic { color: var(--staff-muted); font-size: 12px; }

/* Batch Tags */
.batch-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.batch-tag { display: inline-block; padding: 2px 8px; background: #e0f2fe; color: #0369a1; font-size: 11px; border-radius: 4px; white-space: nowrap; }
.batch-tag.batch-more { background: #f1f5f9; color: #64748b; }

/* DateTime Cell */
.datetime-cell { display: flex; flex-direction: column; gap: 2px; }
.date-display { font-weight: 600; color: var(--staff-text); }
.time-display { color: var(--staff-muted); font-size: 12px; }

/* Meeting Link Buttons */
.meeting-link-btn { display: inline-block; padding: 4px 10px; background: var(--staff-accent); color: #fff; font-size: 11px; border-radius: 4px; text-decoration: none; font-weight: 500; }
.meeting-link-btn:hover { background: var(--staff-accent-dark); color: #fff; }
.copy-link-btn { background: none; border: none; cursor: pointer; font-size: 14px; padding: 4px; opacity: 0.7; }
.copy-link-btn:hover { opacity: 1; }
.copy-link-btn.copied::after { content: '✓'; margin-left: 4px; color: var(--staff-accent); }

/* Status Badge */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: capitalize; }
.status-purple { background: #f3e8ff; color: #7c3aed; }
.status-green { background: #dcfce7; color: #15803d; }
.status-blue { background: #dbeafe; color: #1d4ed8; }
.status-red { background: #fef2f2; color: #dc2626; }
.status-cyan { background: #cffafe; color: #0891b2; } /* recording_attached */
.status-teal { background: #ccfbf1; color: #0d9488; } /* alternative for recording */

/* Cancel Reason */
.cancel-reason { margin-top: 4px; font-size: 11px; color: #dc2626; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* Recording Badge */
.recording-badge { display: block; margin-top: 4px; font-size: 11px; color: #15803d; }

/* Recording Cards */
.recordings-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.recordings-tab { padding: 8px 16px; background: var(--staff-bg); border: 1px solid var(--staff-border); border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.15s ease; }
.recordings-tab:hover { border-color: var(--staff-accent); }
.recordings-tab.active { background: var(--staff-accent); color: #fff; border-color: var(--staff-accent); }

.recordings-list { display: flex; flex-direction: column; gap: 8px; }
.recording-card { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 8px; gap: 16px; transition: all 0.15s ease; }
.recording-card:hover { box-shadow: var(--staff-shadow); }
.recording-card.recording-has { border-left: 3px solid var(--staff-accent); }
.recording-card.recording-pending { border-left: 3px solid var(--staff-orange); }

.recording-card-info { display: flex; gap: 16px; align-items: center; flex: 1; min-width: 0; }
.recording-card-date { display: flex; flex-direction: column; align-items: center; min-width: 60px; text-align: center; }
.recording-card-date .rec-date { font-weight: 600; font-size: 14px; color: var(--staff-primary); }
.recording-card-date .rec-time { font-size: 11px; color: var(--staff-muted); }

.recording-card-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recording-card-details .rec-title { font-weight: 500; font-size: 14px; color: var(--staff-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording-card-details .rec-topic { font-size: 12px; color: var(--staff-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording-card-details .rec-instructor { font-size: 11px; color: var(--staff-muted); }

.recording-card-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.inline-recording-form { display: flex; gap: 8px; align-items: center; }
.inline-recording-input { width: 200px; padding: 6px 10px; border: 1px solid var(--staff-border); border-radius: 6px; font-size: 13px; }
.inline-recording-input:focus { outline: none; border-color: var(--staff-accent); }

/* Staff Badge */
.staff-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.staff-badge-green { background: #dcfce7; color: #15803d; }
.staff-badge-orange { background: #fef3c7; color: #d97706; }
.staff-badge-red { background: #fef2f2; color: #dc2626; }
.staff-badge-gray { background: #f1f5f9; color: #64748b; }

/* Batch Student List */
.batch-student-list-ol { margin: 0; padding: 0 0 0 20px; list-style: decimal; }
.batch-student-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.batch-student-item:last-child { border-bottom: none; }
.batch-search-results { border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px; background: #fafafa; max-height: 150px; overflow-y: auto; }
.batch-search-result-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.batch-search-result-item:last-child { border-bottom: none; }
.staff-btn-xs { padding: 2px 8px; font-size: 11px; }

/* Text Muted */
.text-muted { color: #94a3b8; font-style: italic; }

/* Action Buttons */
.action-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.action-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--staff-bg); border: 1px solid var(--staff-border); border-radius: 6px; cursor: pointer; font-size: 14px; transition: all 0.15s ease; }
.action-btn:hover { background: var(--staff-card); border-color: var(--staff-accent); }
.action-btn.action-btn-danger:hover { border-color: var(--staff-red); background: #fef2f2; }

/* Legacy styles kept for compatibility */
.session-manage-card { background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 12px; overflow: hidden; transition: box-shadow 0.15s ease; }
.session-manage-card:hover { box-shadow: var(--staff-shadow); }
.session-manage-card.cancelled { opacity: 0.7; border-color: #fecaca; }
.session-manage-card.past { background: rgba(241,245,249,0.5); }
.sessions-manage-grid { display: flex; flex-direction: column; gap: 16px; }

.session-edit-form { padding: 16px; background: var(--staff-bg); }
.session-edit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.session-edit-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.session-edit-result { margin-top: 8px; }

/* Danger Button */
.staff-btn-danger { background: var(--staff-red); color: #fff; border: none; }
.staff-btn-danger:hover { background: #dc2626; }

/* =========================================
   STUDENT PROFILE ACTIONS TAB
   ========================================= */

.sp-action-section { margin-bottom: 24px; padding: 20px; background: var(--staff-bg); border-radius: 10px; }
.sp-action-section h4 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--staff-text); }
.sp-action-note { margin: 0 0 16px; font-size: 14px; color: var(--staff-muted); }

/* Viva Forms */
.sp-viva-forms { display: flex; flex-direction: column; gap: 12px; }

.sp-viva-form-row { padding: 12px; background: var(--staff-card); border-radius: 8px; border: 1px solid var(--staff-border); }

.viva-form-grid { display: grid; grid-template-columns: 150px 120px 1fr 80px; gap: 12px; align-items: center; }

.viva-term-label { font-size: 14px; font-weight: 500; color: var(--staff-text); }

.viva-marks-input input, .viva-feedback-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 6px;
    font-size: 13px;
}
.viva-marks-input input:focus, .viva-feedback-input input:focus { outline: none; border-color: var(--staff-accent); }

.viva-result { margin-top: 8px; }
.viva-result .staff-success, .viva-result .staff-error { margin: 0; padding: 6px 10px; font-size: 12px; }

/* Batch Transfer */
.batch-transfer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.batch-transfer-grid .staff-form-row { margin: 0; }
.batch-transfer-grid .staff-form-row label { display: block; font-size: 13px; font-weight: 500; color: var(--staff-muted); margin-bottom: 6px; }
.batch-transfer-grid select, .batch-transfer-grid input { width: 100%; padding: 10px 14px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: var(--staff-card); }

#transfer-result { margin-top: 12px; }

/* =========================================
   RESOURCES SECTION
   ========================================= */

.staff-section-resources .staff-section-header { display: flex; justify-content: space-between; align-items: center; }
.staff-section-resources .staff-section-header h2 { margin: 0; }

.resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.resource-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 10px; transition: all 0.15s ease; }
.resource-card:hover { box-shadow: var(--staff-shadow); }

.resource-icon { width: 44px; height: 44px; background: linear-gradient(135deg, var(--staff-primary), var(--staff-primary-light)); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.resource-icon svg { width: 22px; height: 22px; color: #fff; }

.resource-info { flex: 1; min-width: 0; }
.resource-info h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--staff-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--staff-muted); margin-bottom: 6px; }
.resource-meta span { display: flex; align-items: center; }
.resource-meta span:not(:last-child)::after { content: '•'; margin-left: 8px; }
.resource-desc { margin: 0; font-size: 13px; color: var(--staff-muted); line-height: 1.4; }

.resource-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* Resource Upload Form */
#resource-upload-form .form-help { display: block; margin-top: 6px; font-size: 12px; color: var(--staff-muted); }
#resource-upload-form input[type="file"] { padding: 10px; border: 2px dashed var(--staff-border); border-radius: 8px; background: var(--staff-bg); width: 100%; cursor: pointer; }
#resource-upload-form input[type="file"]:hover { border-color: var(--staff-accent); }

/* =========================================
   STUDENT EDIT FORM
   ========================================= */

.student-edit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.student-edit-grid .staff-form-row { margin: 0; }
.student-edit-grid .staff-form-row label { display: block; font-size: 12px; font-weight: 500; color: var(--staff-muted); margin-bottom: 4px; }
.student-edit-grid input, .student-edit-grid select { width: 100%; padding: 8px 12px; border: 1px solid var(--staff-border); border-radius: 6px; font-size: 13px; background: var(--staff-card); }
.student-edit-grid input:focus, .student-edit-grid select:focus { outline: none; border-color: var(--staff-accent); }

#student-edit-result { margin-top: 12px; }

/* =========================================
   COURSE PROGRESS UPDATE
   ========================================= */

.course-progress-forms { display: flex; flex-direction: column; gap: 8px; }

.course-progress-row { padding: 10px 14px; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 8px; }

.course-progress-form { display: flex; align-items: center; gap: 12px; }

.cp-course-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--staff-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cp-progress-input { display: flex; align-items: center; gap: 4px; }
.cp-progress-input input { width: 60px; padding: 6px 8px; border: 1px solid var(--staff-border); border-radius: 4px; font-size: 13px; text-align: center; }
.cp-progress-input input:focus { outline: none; border-color: var(--staff-accent); }
.cp-percent { font-size: 13px; color: var(--staff-muted); }

.cp-result { margin-left: 8px; font-size: 12px; }
.cp-success { color: var(--staff-accent); }
.cp-error { color: var(--staff-red); }

/* =========================================
   TICKET ASSIGNMENT
   ========================================= */

.ticket-header-actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ticket-action-group { display: flex; flex-direction: column; }
.ticket-header-actions select { padding: 8px 12px; border: 1px solid var(--staff-border); border-radius: 6px; font-size: 13px; background: var(--staff-card); min-width: 140px; }
.ticket-header-actions select:focus { outline: none; border-color: var(--staff-accent); }
#ticket-update-btn { padding: 8px 16px; height: fit-content; }

#ticket-assign-select { border-color: var(--staff-blue); }

/* =========================================
   BATCH MANAGEMENT
   ========================================= */

.batch-mgmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.batch-mgmt-card { background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 12px; padding: 20px; transition: all 0.15s ease; }
.batch-mgmt-card:hover { box-shadow: var(--staff-shadow); }

.batch-mgmt-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.batch-mgmt-header h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--staff-text); }
.batch-mgmt-header .batch-program { font-size: 13px; color: var(--staff-muted); }

.batch-mgmt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.batch-stat-item { text-align: center; }
.batch-stat-item .stat-value { display: block; font-size: 18px; font-weight: 600; color: var(--staff-text); }
.batch-stat-item .stat-label { font-size: 11px; color: var(--staff-muted); text-transform: uppercase; letter-spacing: 0.3px; }

.batch-mgmt-dates { display: flex; gap: 16px; font-size: 13px; color: var(--staff-muted); margin-bottom: 14px; }
.batch-mgmt-dates span { display: flex; align-items: center; gap: 4px; }

.batch-mgmt-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--staff-border); padding-top: 14px; }

/* Batch Form */
.batch-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.batch-form-grid .staff-form-row { margin: 0; }
.batch-form-grid .staff-form-row.full-width { grid-column: 1 / -1; }
.batch-form-grid label { display: block; font-size: 13px; font-weight: 500; color: var(--staff-muted); margin-bottom: 6px; }
.batch-form-grid input, .batch-form-grid select { width: 100%; padding: 10px 14px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: var(--staff-card); }
.batch-form-grid input:focus, .batch-form-grid select:focus { outline: none; border-color: var(--staff-accent); }

.batch-form-checkbox { display: flex; align-items: center; gap: 10px; }
.batch-form-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--staff-accent); }
.batch-form-checkbox label { margin: 0; color: var(--staff-text); }

/* =========================================
   INSTRUCTOR MANAGEMENT
   ========================================= */

.instructor-grid, .instructors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }

.instructor-card { background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 12px; padding: 20px; display: flex; align-items: flex-start; gap: 16px; transition: all 0.15s ease; }
.instructor-card:hover { box-shadow: var(--staff-shadow); }
.instructor-card.inactive { opacity: 0.7; background: var(--staff-bg); }

.instructor-avatar { width: 56px; height: 56px; background: linear-gradient(135deg, var(--staff-primary), var(--staff-primary-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; color: #fff; flex-shrink: 0; }

.instructor-info { flex: 1; min-width: 0; }
.instructor-info h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--staff-text); display: flex; align-items: center; gap: 8px; }
.instructor-info h4 .inactive-badge { font-size: 10px; padding: 2px 6px; background: var(--staff-border); color: var(--staff-muted); border-radius: 4px; font-weight: 500; }
.instructor-email { font-size: 13px; color: var(--staff-muted); margin: 0 0 8px; }
.instructor-spec { display: inline-block; font-size: 12px; padding: 4px 10px; background: var(--staff-bg); color: var(--staff-text); border-radius: 6px; margin-bottom: 8px; }
.instructor-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--staff-muted); }

.instructor-contact { font-size: 13px; color: var(--staff-muted); margin-bottom: 6px; }
.instructor-contact a { color: var(--staff-blue); text-decoration: none; }
.instructor-contact a:hover { text-decoration: underline; }

.instructor-stats { display: flex; gap: 16px; font-size: 12px; color: var(--staff-muted); margin-bottom: 12px; }
.instructor-stats span { display: flex; align-items: center; gap: 4px; }

.instructor-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; margin-left: auto; }
.instructor-actions .staff-btn { min-width: 70px; text-align: center; }

/* Instructor Form */
.instructor-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.instructor-form-grid .staff-form-row { margin: 0; }
.instructor-form-grid .staff-form-row.full-width { grid-column: 1 / -1; }
.instructor-form-grid label { display: block; font-size: 13px; font-weight: 500; color: var(--staff-muted); margin-bottom: 6px; }
.instructor-form-grid input { width: 100%; padding: 10px 14px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: var(--staff-card); }
.instructor-form-grid input:focus { outline: none; border-color: var(--staff-accent); }

/* =========================================
   CERTIFICATE ISSUANCE
   ========================================= */

.cert-issue-container { max-width: 600px; }

.cert-search-container { position: relative; margin-bottom: 16px; }
.cert-search-container label { display: block; font-size: 13px; font-weight: 500; color: var(--staff-muted); margin-bottom: 6px; }
.cert-search-container input[type="text"] { width: 100%; padding: 12px 16px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: var(--staff-card); }
.cert-search-container input:focus { outline: none; border-color: var(--staff-accent); }

#cert-search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 8px; box-shadow: var(--staff-shadow); max-height: 200px; overflow-y: auto; z-index: 100; display: none; }

.cert-search-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--staff-border); transition: background 0.1s; }
.cert-search-item:last-child { border-bottom: none; }
.cert-search-item:hover { background: var(--staff-bg); }
.cert-search-item strong { color: var(--staff-text); }
.cert-search-item span { color: var(--staff-muted); font-size: 13px; }

.cert-search-empty { padding: 16px; text-align: center; color: var(--staff-muted); font-size: 14px; }

.cert-course-select-row { margin-bottom: 16px; }
.cert-course-select-row label { display: block; font-size: 13px; font-weight: 500; color: var(--staff-muted); margin-bottom: 6px; }
.cert-course-select-row select { width: 100%; padding: 12px 16px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: var(--staff-card); }
.cert-course-select-row select:focus { outline: none; border-color: var(--staff-accent); }
.cert-course-select-row select:disabled { background: var(--staff-bg); color: var(--staff-muted); }

#cert-issue-result { margin-top: 16px; }

/* Recent Certificates Table */
.recent-certs-section { margin-top: 32px; }
.recent-certs-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--staff-text); }

/* =========================================
   EVALUATION LOGS
   ========================================= */

.staff-section-evalogs .staff-user-cell { display: flex; align-items: center; gap: 12px; }
.staff-section-evalogs .staff-user-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--staff-primary), var(--staff-primary-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: #fff; flex-shrink: 0; }

.eval-count { font-size: 18px; color: var(--staff-primary); }

.eval-performance-bar { height: 8px; background: var(--staff-border); border-radius: 4px; overflow: hidden; margin-bottom: 4px; min-width: 100px; }
.eval-performance-fill { height: 100%; background: linear-gradient(90deg, var(--staff-primary), var(--staff-primary-light)); border-radius: 4px; transition: width 0.3s ease; }

.staff-evaluator-tag { display: inline-block; padding: 4px 10px; background: var(--staff-bg); border: 1px solid var(--staff-border); border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--staff-text); }

/* =========================================
   VIVA & PET MARKS
   ========================================= */

.staff-section-viva .staff-search-bar { margin-bottom: 20px; }
.staff-search-input { width: 100%; max-width: 400px; padding: 12px 16px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; background: var(--staff-card); }
.staff-search-input:focus { outline: none; border-color: var(--staff-primary); }

.staff-stats-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .staff-stats-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .staff-stats-grid-4 { grid-template-columns: 1fr; } }

/* Highlighted stat card - dark green accent with white text */
.staff-stat-purple { background: var(--staff-primary); }
.staff-stat-purple .staff-stat-icon { background: rgba(255,255,255,0.15); color: #fff; }
.staff-stat-purple .staff-stat-value,
.staff-stat-purple .staff-stat-label { color: #fff; }

.viva-modal-student { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--staff-border); }

.viva-entry-sections { display: flex; flex-direction: column; gap: 24px; }

.viva-entry-section { padding: 16px; background: var(--staff-bg); border-radius: 10px; }
.viva-entry-section h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--staff-text); }
.viva-entry-section .viva-note { margin: 0 0 12px; font-size: 12px; color: var(--staff-muted); }

.viva-form-inline { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.viva-field { display: flex; flex-direction: column; gap: 4px; }
.viva-field label { font-size: 12px; font-weight: 500; color: var(--staff-muted); }
.viva-field input { padding: 8px 12px; border: 1px solid var(--staff-border); border-radius: 6px; font-size: 14px; background: var(--staff-card); }
.viva-field input:focus { outline: none; border-color: var(--staff-primary); }
.viva-field-wide { flex: 1; min-width: 150px; }
.viva-field-wide input { width: 100%; }

.viva-section-result { margin-top: 8px; font-size: 13px; }
.viva-section-result.success { color: var(--staff-green); }
.viva-section-result.error { color: var(--staff-red); }

/* v3.6.7: Viva Eligibility Tracking */
.viva-stat-filter { cursor: pointer; transition: box-shadow 0.2s ease, transform 0.15s ease; }
.viva-stat-filter:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.viva-stat-filter.active { box-shadow: 0 0 0 3px rgba(0,123,255,0.5); }

#viva-filter-label { font-weight: 500; color: var(--staff-primary); }
#viva-clear-filter { background: var(--staff-bg); border: 1px solid var(--staff-border); }
#viva-clear-filter:hover { background: var(--staff-muted); color: #fff; }

.staff-badge-red { background: #dc3545; color: #fff; }

/* Alert Box */
.staff-alert { padding: 14px 18px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.staff-alert-info { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.staff-alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.staff-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.staff-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.staff-alert strong { font-weight: 600; }

/* Empty State Enhancement */
.staff-empty-state { text-align: center; padding: 48px 24px; background: var(--staff-card); border: 1px solid var(--staff-border); border-radius: 12px; }
.staff-empty-state svg { color: var(--staff-muted); margin-bottom: 16px; }
.staff-empty-state p { color: var(--staff-muted); margin: 0; }

/* =========================================
   BATCH EMAIL FEATURE
   ========================================= */

/* Icon Button */
.staff-btn-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--staff-border); background: var(--staff-card); color: var(--staff-muted); cursor: pointer; transition: all 0.15s ease; }
.staff-btn-icon:hover { background: var(--staff-primary); border-color: var(--staff-primary); color: #fff; }
.staff-btn-icon svg { flex-shrink: 0; }

/* Batch Card Header with Email Button */
.staff-batch-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.staff-batch-title { flex: 1; }
.staff-batch-title h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--staff-text); }

/* Batch Email Modal */
.batch-email-info { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--staff-bg); border-radius: 8px; margin-bottom: 20px; }
.email-batch-name { font-weight: 600; color: var(--staff-text); }
.email-recipient-count { font-size: 13px; color: var(--staff-muted); padding: 4px 10px; background: var(--staff-card); border-radius: 20px; }

.staff-textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--staff-border); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; min-height: 150px; background: var(--staff-card); }
.staff-textarea:focus { outline: none; border-color: var(--staff-primary); }

.staff-form-hint { font-size: 12px; color: var(--staff-muted); margin-top: 6px; }

.staff-form-status { margin-top: 16px; padding: 12px 16px; border-radius: 8px; font-size: 14px; display: none; }
.staff-form-status.success { display: block; background: #d1fae5; color: #065f46; }
.staff-form-status.error { display: block; background: #fee2e2; color: #991b1b; }
.staff-form-status.loading { display: block; background: #e0f2fe; color: #0369a1; }

.required { color: var(--staff-red); }

/* Mobile Responsive */
@media (max-width: 900px) {
  .staff-sidebar { width: 200px; }
  .staff-nav-item { padding: 10px 16px; font-size: 13px; }
}

@media (max-width: 768px) {
  .staff-header { padding: 12px 16px; }
  .staff-logo { height: 28px; }
  .staff-header-title h1 { font-size: 16px; }
  .staff-user-details { display: none; }

  .staff-layout { flex-direction: column; }

  .staff-sidebar-toggle { display: flex; align-items: center; justify-content: center; width: 100%; padding: 14px; background: var(--staff-card); border: none; border-bottom: 1px solid var(--staff-border); font-size: 14px; font-weight: 600; cursor: pointer; }

  .staff-sidebar { width: 100%; max-height: 0; overflow: hidden; transition: max-height .3s ease; border-right: none; border-bottom: 1px solid var(--staff-border); }
  .staff-sidebar.open { max-height: 500px; }

  .staff-main { padding: 12px; }

  /* Section Headers Mobile */
  .staff-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .staff-section-header h2 { font-size: 18px; }
  .staff-section-header .staff-btn { width: 100%; justify-content: center; }

  .staff-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .staff-stat-card { padding: 14px; gap: 10px; }
  .staff-stat-value { font-size: 20px; }
  .staff-stat-label { font-size: 11px; }
  .staff-stat-icon { width: 40px; height: 40px; }

  .staff-filters { flex-direction: column; gap: 10px; }
  .staff-filters input, .staff-filters select { width: 100%; }

  /* CRITICAL: Table Responsive - Horizontal Scroll */
  .staff-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px; }
  .staff-table { font-size: 13px; min-width: 600px; }
  .staff-table th, .staff-table td { padding: 10px 8px; white-space: nowrap; }
  .staff-table th { min-width: 80px; }
  .staff-table td:first-child { min-width: 90px; }
  .staff-table .staff-btn { padding: 6px 10px; font-size: 12px; }

  /* Mini Stats Mobile */
  .staff-mini-stats { flex-wrap: wrap; gap: 8px; }
  .staff-mini-stat { padding: 6px 10px; font-size: 12px; }

  .staff-team-stats { flex-wrap: wrap; gap: 16px; }
  .staff-team-count { font-size: 24px; }

  .staff-stats-grid-3 { grid-template-columns: 1fr; gap: 10px; }
  .staff-stats-grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .staff-stat-large .staff-stat-value { font-size: 24px; }

  .staff-grid-2 { grid-template-columns: 1fr; }

  .staff-batch-grid { grid-template-columns: 1fr; }

  .staff-reports-grid { grid-template-columns: 1fr; }

  /* Quick Actions Mobile */
  .staff-actions-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .staff-action-btn { padding: 14px 10px; }
  .staff-action-btn span { font-size: 12px; }

  /* Student Profile Modal Mobile */
  .staff-modal-container { width: 100%; max-width: 100%; max-height: 100vh; border-radius: 0; margin: 0; }
  .staff-modal-body { padding: 16px; }
  .sp-header { flex-direction: column; text-align: center; gap: 12px; }
  .sp-header-actions { justify-content: center; flex-wrap: wrap; gap: 8px; }
  .sp-header-actions .staff-btn { padding: 8px 14px; font-size: 13px; }
  .sp-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sp-stat-card { padding: 12px; }
  .sp-stat-value { font-size: 18px; }
  .sp-info-grid { grid-template-columns: 1fr; }
  .sp-tabs { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 2px; }
  .sp-tab { padding: 10px 12px; font-size: 12px; flex-shrink: 0; }

  /* Tabs Mobile */
  .staff-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 0; }
  .staff-tab { white-space: nowrap; padding: 10px 14px; font-size: 13px; flex-shrink: 0; }

  /* Form Actions Mobile */
  .staff-form-actions { flex-direction: column; }
  .staff-form-actions .staff-btn { width: 100%; }

  /* Class Scheduling Mobile */
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .class-card { flex-direction: column; align-items: stretch; gap: 12px; }
  .class-card-time { flex-direction: row; justify-content: center; gap: 8px; padding: 0 0 12px; border-right: none; border-bottom: 1px solid var(--staff-border); }
  .class-card-actions { justify-content: center; flex-wrap: wrap; }

  .staff-risk-tabs { flex-wrap: wrap; gap: 8px; }

  .staff-bar-chart { height: 140px; }
  .staff-bar { max-width: 40px; }

  /* Attendance Mobile */
  .attendance-session-card { flex-direction: column; align-items: stretch; gap: 12px; }
  .att-session-date { flex-direction: row; justify-content: center; gap: 8px; padding: 0 0 12px; border-right: none; border-bottom: 1px solid var(--staff-border); }
  .att-session-status { text-align: center; }
  .att-student-status { flex-direction: column; gap: 8px; }

  /* Sessions Management Mobile */
  .session-manage-header { flex-direction: column; gap: 10px; }
  .session-manage-status { flex-direction: row; align-items: center; justify-content: flex-start; }
  .session-edit-grid { grid-template-columns: 1fr; }

  /* Viva Forms Mobile */
  .viva-form-grid { grid-template-columns: 1fr; gap: 8px; }
  .viva-term-label { font-weight: 600; }

  /* Batch Transfer Mobile */
  .batch-transfer-grid { grid-template-columns: 1fr; }

  /* Resources Mobile */
  .resources-grid { grid-template-columns: 1fr; }
  .resource-card { flex-direction: column; text-align: center; gap: 10px; }
  .resource-icon { margin: 0 auto; }
  .resource-actions { flex-direction: row; justify-content: center; }

  /* Student Edit Mobile */
  .student-edit-grid { grid-template-columns: 1fr; }

  /* Course Progress Mobile */
  .course-progress-form { flex-wrap: wrap; }
  .cp-course-name { width: 100%; margin-bottom: 8px; }

  /* Ticket Header Mobile */
  .ticket-header { flex-direction: column; gap: 12px; }
  .ticket-header-actions { width: 100%; flex-wrap: wrap; }
  .ticket-header-actions select { flex: 1; min-width: 120px; }

  /* Batch Management Mobile */
  .batch-mgmt-grid { grid-template-columns: 1fr; }
  .batch-form-grid { grid-template-columns: 1fr; }
  .batch-mgmt-dates { flex-direction: column; gap: 6px; }
  .batch-mgmt-stats { grid-template-columns: repeat(3, 1fr); }

  /* Instructor Management Mobile */
  .instructor-grid, .instructors-grid { grid-template-columns: 1fr; }
  .instructor-card { flex-direction: column; text-align: center; }
  .instructor-avatar { margin: 0 auto; }
  .instructor-actions { flex-direction: row; justify-content: center; margin-left: 0; }
  .instructor-form-grid { grid-template-columns: 1fr; }

  /* Certificate Issuance Mobile */
  .cert-issue-container { max-width: 100%; }

  /* Evaluation Section Mobile */
  .staff-section-evalogs .staff-table-container { margin: 0; }

  /* Courses Grid Mobile */
  .sp-courses-grid { gap: 10px; }
  .sp-course-card { padding: 12px; }
}

/* Extra Small Screens */
@media (max-width: 480px) {
  .staff-main { padding: 10px; }
  .staff-section-header h2 { font-size: 16px; }

  .staff-stats-grid { grid-template-columns: 1fr; }
  .staff-stats-grid-4 { grid-template-columns: 1fr; }

  .staff-stat-card { flex-direction: row; justify-content: flex-start; }

  .staff-actions-grid { grid-template-columns: 1fr; }

  .sp-stats-grid { grid-template-columns: 1fr; }
  .sp-tabs { justify-content: flex-start; }

  .staff-modal-header { padding: 14px 16px; }
  .staff-modal-header h2 { font-size: 16px; }

  .staff-table { min-width: 500px; font-size: 12px; }
  .staff-table th, .staff-table td { padding: 8px 6px; }
}

/* ============================================================
   REPUTATION SECTION
   ============================================================ */

.staff-section-reputation { }

/* Cumulative Stats Changes */
.staff-stat-change { display: block; font-size: 11px; margin-top: 4px; }
.staff-stat-up { color: #10b981; }
.staff-stat-down { color: #ef4444; }
.staff-stat-stars { display: flex; gap: 2px; justify-content: center; margin-top: 4px; }
.staff-stat-stars .star { color: #d1d5db; font-size: 14px; }
.staff-stat-stars .star.filled { color: #fbbf24; }

/* Reputation Platform Cards */
.staff-reputation-card {
  background: var(--staff-card);
  border-radius: var(--staff-radius);
  padding: 20px;
  box-shadow: var(--staff-shadow);
  border: 1px solid var(--staff-border);
}

.reputation-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--staff-border);
}

.reputation-platform-icon { display: flex; align-items: center; }
.reputation-platform-icon svg { width: 28px; height: 28px; }
.reputation-platform-name { font-weight: 600; font-size: 15px; color: var(--staff-text); }

.reputation-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reputation-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
  background: var(--staff-bg);
  border-radius: 8px;
}

.reputation-metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--staff-text);
  line-height: 1.2;
}

.reputation-metric-label {
  font-size: 12px;
  color: var(--staff-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.reputation-stars {
  display: flex;
  gap: 2px;
  margin-top: 6px;
}

.reputation-stars .star {
  color: #d1d5db;
  font-size: 16px;
}

.reputation-stars .star.filled {
  color: #fbbf24;
}

.reputation-change {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
}

.reputation-change.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.reputation-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Reputation Update Form */
.reputation-update-card {
  background: var(--staff-bg);
  padding: 16px;
  border-radius: 8px;
}

.reputation-update-card h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--staff-text);
}

.reputation-update-card .staff-form-row {
  margin-bottom: 12px;
}

.reputation-update-card label {
  display: block;
  font-size: 12px;
  color: var(--staff-muted);
  margin-bottom: 4px;
}

.reputation-update-card .staff-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--staff-border);
  border-radius: 6px;
  font-size: 14px;
}

/* Section Subtitle */
.staff-section-subtitle {
  font-size: 12px;
  color: var(--staff-muted);
  font-weight: 400;
  margin-left: 12px;
}

/* Help Text */
.staff-help-text {
  font-size: 13px;
  color: var(--staff-muted);
  margin-bottom: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .staff-reputation-card { padding: 16px; }
  .reputation-metric-value { font-size: 24px; }
  .reputation-update-card { padding: 12px; }
}

/* Category Rating Cards */
.staff-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-rating-card {
  background: var(--staff-card);
  border-radius: var(--staff-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--staff-shadow);
  border: 1px solid var(--staff-border);
}

.category-rating-label {
  font-size: 12px;
  color: var(--staff-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.category-rating-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--staff-text);
  line-height: 1.2;
}

.category-rating-value small {
  font-size: 14px;
  color: var(--staff-muted);
  font-weight: 400;
}

.category-rating-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.category-rating-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.category-needs-improvement {
  display: inline-block;
  font-size: 10px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 8px;
  font-weight: 500;
}

/* Feedback Insights Cards */
.feedback-insights-card {
  background: var(--staff-card);
  border-radius: var(--staff-radius);
  padding: 16px;
  box-shadow: var(--staff-shadow);
  border: 1px solid var(--staff-border);
}

.feedback-insights-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--staff-border);
}

.feedback-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feedback-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: var(--staff-text);
  line-height: 1.5;
}

.feedback-list li:last-child {
  border-bottom: none;
}

.feedback-list li.feedback-empty {
  color: var(--staff-muted);
  font-style: italic;
}

/* Stats Red color */
.staff-stat-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

.staff-stat-red .staff-stat-value {
  color: #dc2626;
}

/* Mobile Responsive for Category Ratings */
@media (max-width: 1024px) {
  .staff-grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .staff-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .category-rating-card { padding: 12px; }
  .category-rating-value { font-size: 22px; }
}

@media (max-width: 480px) {
  .staff-grid-5 { grid-template-columns: 1fr; }
}

/* =========================================
   TICKET CONTACT BUTTONS (v3.3.0)
   ========================================= */

.ticket-contact-actions { display: flex; gap: 8px; align-items: center; }

.staff-btn-contact {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.staff-btn-contact:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.staff-btn-call {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.staff-btn-email {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* G-Meet Scheduling Section */
.gmeet-schedule-section {
    margin-top: 16px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
}

.gmeet-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #166534;
}

.gmeet-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

.gmeet-fields {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #86efac;
}

.gmeet-field-row { margin-bottom: 12px; }

.gmeet-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* =========================================
   NOTIFICATIONS SECTION (v3.3.0)
   ========================================= */

.recipient-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 8px 0;
}

.staff-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.staff-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--staff-accent);
}

.batch-select-row { margin-top: 12px; }

/* =========================================
   TRAINER MESSAGES SECTION (v3.3.0)
   ========================================= */

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-card {
    background: var(--staff-card);
    border: 1px solid var(--staff-border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.15s ease;
}

.message-card.unread {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    border-left: 4px solid var(--staff-accent);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.message-time {
    font-size: 12px;
    color: var(--staff-muted);
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--staff-accent);
    border-radius: 50%;
}

.message-subject {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--staff-text);
}

.message-body {
    font-size: 14px;
    color: var(--staff-text);
    line-height: 1.5;
    margin: 0 0 12px;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-from {
    font-size: 12px;
    color: var(--staff-muted);
}

/* =========================================
   WORKSHOP SECTION (v3.3.0)
   ========================================= */

.workshop-add-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.workshop-add-grid .staff-form-row { margin: 0; }
.workshop-add-grid .staff-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}
.workshop-add-grid .staff-form-row.full-width {
    grid-column: 1 / -1;
}

/* Date Range Inputs (v3.6.6) */
.date-range-inputs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}
.date-input-group .date-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--staff-muted);
    background: var(--staff-bg);
    padding: 8px 12px;
    border-radius: 6px 0 0 6px;
    border: 1px solid var(--staff-border);
    border-right: none;
    white-space: nowrap;
}
.date-input-group input[type="date"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    background: var(--staff-card);
}
.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: var(--staff-accent);
}

.workshop-add-grid select,
.workshop-add-grid input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--staff-border);
    border-radius: 8px;
    font-size: 14px;
}

/* =========================================
   PROJECT ASSIGNMENT (v3.3.0)
   ========================================= */

.project-assign-select {
    min-width: 100px;
    padding: 6px 8px;
    border: 1px solid var(--staff-border);
    border-radius: 6px;
    background: var(--staff-card);
    font-size: 12px;
    cursor: pointer;
}

.project-assign-select:focus {
    outline: none;
    border-color: var(--staff-accent);
}

.taken-action-input {
    border: 1px solid var(--staff-border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

.taken-action-text {
    font-size: 13px;
    color: var(--staff-accent);
    font-weight: 500;
}

/* All Projects Filters */
.projects-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.projects-filters input,
.projects-filters select {
    padding: 8px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 8px;
    font-size: 14px;
}

/* =========================================
   VIVA MARKS UPDATES (v3.3.0)
   ========================================= */

.staff-badge-purple {
    background: rgba(147, 51, 234, 0.15);
    color: #7c3aed;
}

/* =========================================
   TOAST NOTIFICATIONS (v3.3.0)
   ========================================= */

.staff-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.staff-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.staff-toast-success {
    background: #10b981;
    color: white;
}

.staff-toast-error {
    background: #ef4444;
    color: white;
}

.staff-toast-info {
    background: #3b82f6;
    color: white;
}

/* =========================================
   SEARCHABLE BATCH DROPDOWN (v3.6.6)
   ========================================= */

.searchable-select-wrapper {
    position: relative;
}

.batch-search-input {
    margin-bottom: 8px;
    padding: 10px 14px !important;
    border: 1.5px solid var(--staff-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #fff;
}

.batch-search-input:focus {
    border-color: var(--staff-accent) !important;
    outline: none;
}

.batch-search-input::placeholder {
    color: var(--staff-muted);
}

select.searchable-select {
    display: block;
    width: 100% !important;
    max-height: 200px;
    overflow-y: auto;
    padding: 0 !important;
    border: 1.5px solid var(--staff-border);
    border-radius: 8px;
    background: #fff;
}

select.searchable-select option {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    font-size: 13px;
}

select.searchable-select option:hover,
select.searchable-select option:checked {
    background: linear-gradient(0deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.1) 100%);
    color: var(--staff-primary);
}

select.searchable-select option[style*="display: none"] {
    display: none !important;
}

.batch-search-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--staff-muted);
}

.batch-search-hint .batch-count {
    font-weight: 600;
    color: var(--staff-accent);
}

/* =========================================
   MULTI-BATCH CHECKBOX SELECTOR (v3.7.1)
   ========================================= */

.batch-multiselect-wrapper {
    position: relative;
}

.staff-hint-inline {
    display: inline-block;
    margin-left: 6px;
    font-weight: 400;
    font-size: 11.5px;
    color: var(--staff-muted);
}

.batch-selected-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    font-size: 13px;
    color: var(--staff-primary, #0f172a);
}

.batch-selected-summary .summary-text strong {
    color: var(--staff-accent);
    font-weight: 700;
}

.batch-clear-selection-btn {
    background: #fff;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.batch-clear-selection-btn:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

.batch-checkbox-list {
    max-height: 420px;
    min-height: 180px;
    overflow-y: auto;
    border: 1.5px solid var(--staff-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    scrollbar-width: thin;
}

.batch-checkbox-list::-webkit-scrollbar {
    width: 10px;
}

.batch-checkbox-list::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 8px;
}

.batch-checkbox-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
    border: 2px solid #f8fafc;
}

.batch-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.batch-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
    margin-bottom: 2px;
    user-select: none;
}

.batch-checkbox-item:hover {
    background: rgba(16, 185, 129, 0.06);
}

.batch-checkbox-item.selected {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.45);
}

.batch-checkbox-item.batch-hidden {
    display: none;
}

.batch-checkbox-item input[type="checkbox"] {
    margin: 2px 0 0 0;
    width: 16px;
    height: 16px;
    accent-color: var(--staff-accent, #10b981);
    flex-shrink: 0;
    cursor: pointer;
}

.batch-checkbox-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.batch-checkbox-body .batch-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--staff-primary, #0f172a);
    line-height: 1.3;
    word-break: break-word;
}

.batch-checkbox-body .batch-meta {
    font-size: 11.5px;
    color: var(--staff-muted, #64748b);
    line-height: 1.3;
}

.batch-checkbox-list-empty {
    padding: 24px 12px;
    text-align: center;
    color: var(--staff-muted);
    font-size: 13px;
    font-style: italic;
}

/* =========================================
   TICKET DETAIL MODAL (v3.7.1)
   ========================================= */
.ticket-student-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 14px 0 16px;
    font-size: 13px;
    line-height: 1.8;
}
.ticket-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ticket-detail-label {
    color: #64748b;
    font-weight: 600;
    min-width: 70px;
}
.ticket-message {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #0f172a;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.ticket-message-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Ticket attachment upload */
.ticket-attach-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ticket-attach-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    margin: 0 !important;
}
.ticket-attach-input {
    font-size: 12px;
    flex: 1;
    min-width: 200px;
}
.reply-attachment {
    margin-top: 8px;
    padding: 6px 10px;
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: 6px;
    font-size: 12px;
}
.reply-attachment a {
    color: #1e40af;
    text-decoration: none;
    word-break: break-all;
}
.reply-attachment a:hover {
    text-decoration: underline;
}

/* SLA / age badges */
.ticket-sla-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}
.ticket-sla-badge.sla-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.ticket-sla-badge.sla-warn {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fdba74;
}
.ticket-sla-badge.sla-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    animation: sla-pulse 2s ease-in-out infinite;
}
@keyframes sla-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}
.ticket-row-sla-danger td:first-child {
    border-left: 3px solid #dc2626;
}
.ticket-row-sla-warn td:first-child {
    border-left: 3px solid #f59e0b;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */

@media (max-width: 768px) {
    .ticket-contact-actions { margin-bottom: 12px; }
    .gmeet-datetime { grid-template-columns: 1fr; }
    .workshop-add-grid { grid-template-columns: 1fr; }
    .recipient-options { flex-direction: column; gap: 8px; }
    .projects-filters { flex-direction: column; align-items: stretch; }
    .projects-filters input,
    .projects-filters select { width: 100%; }
    .staff-toast { left: 20px; right: 20px; bottom: 10px; }
}

/* Accessibility — keyboard focus outlines (staff portal) */
.staff-tab:focus-visible,
.staff-btn:focus-visible,
.staff-section button:focus-visible,
.staff-section a:focus-visible {
    outline: 2px solid var(--staff-accent, #10b981);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile: universal horizontal scroll for staff tables
   Many staff tables are too wide for phones; this keeps the page
   layout intact instead of blowing out the viewport. */
.staff-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 720px) {
    .staff-table { min-width: 640px; }
}

/* ===== Internal Notes (v3.7.24) ===== */
.sp-notes-help {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    color: var(--staff-muted);
}
.sp-notes-help-inline {
    font-weight: 400;
    color: var(--staff-muted);
    font-size: 11px;
}
.internal-note-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.internal-note-grid .staff-form-row { margin: 0; }
.internal-note-grid .full-width { grid-column: 1 / -1; }
.internal-note-grid label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--staff-muted);
    margin-bottom: 4px;
}
.internal-note-grid input,
.internal-note-grid select,
.internal-note-grid textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--staff-card);
    font-family: inherit;
}
.internal-note-grid input:focus,
.internal-note-grid select:focus,
.internal-note-grid textarea:focus {
    outline: none;
    border-color: var(--staff-accent);
}
.internal-note-grid .required { color: #dc2626; }

#internal-notes-list { display: flex; flex-direction: column; gap: 12px; }
.internal-note-card {
    position: relative;
    padding: 14px 16px;
    background: var(--staff-card);
    border: 1px solid var(--staff-border);
    border-left: 3px solid var(--staff-accent);
    border-radius: 8px;
}
.internal-note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 12px;
}
.internal-note-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #e5e7eb;
    color: #374151;
}
.internal-note-cat-commitment { background: #dbeafe; color: #1e40af; }
.internal-note-cat-discussion { background: #f3e8ff; color: #6b21a8; }
.internal-note-cat-issue      { background: #fee2e2; color: #991b1b; }
.internal-note-cat-follow_up  { background: #fef3c7; color: #92400e; }
.internal-note-cat-other      { background: #e5e7eb; color: #374151; }
.internal-note-author {
    font-weight: 600;
    color: var(--staff-text);
}
.internal-note-time {
    color: var(--staff-muted);
    font-size: 12px;
}
.internal-note-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--staff-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
}
.internal-note-delete:hover { background: #fee2e2; color: #991b1b; }
.internal-note-body {
    color: var(--staff-text);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.internal-note-mentions,
.internal-note-followup {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--staff-border);
    font-size: 12px;
    color: var(--staff-muted);
}
@media (max-width: 720px) {
    .internal-note-grid { grid-template-columns: 1fr; }
}

/* ===== Notification Bell + Pending-work Modal (v3.7.24) ===== */
.staff-notif-wrapper { position: relative; margin-right: 12px; }
.staff-notif-btn {
    position: relative;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}
.staff-notif-btn:hover { background: rgba(255,255,255,0.16); }
.staff-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--staff-bg, #fff);
}
.staff-notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.staff-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    font-size: 14px;
}
.staff-notif-mark-all {
    background: none;
    border: none;
    color: var(--staff-accent);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.staff-notif-mark-all:hover { background: #f3f4f6; }
.staff-notif-list {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}
.staff-notif-empty {
    padding: 24px 14px;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
}
.staff-notif-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    color: #111827;
}
.staff-notif-item:last-child { border-bottom: none; }
.staff-notif-item:hover { background: #f9fafb; }
.staff-notif-item.unread { background: #eff6ff; }
.staff-notif-item.unread:hover { background: #dbeafe; }
.staff-notif-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.staff-notif-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e5e7eb;
    color: #374151;
}
.staff-notif-type-project { background: #fef3c7; color: #92400e; }
.staff-notif-type-ticket { background: #fee2e2; color: #991b1b; }
.staff-notif-type-live_class { background: #dbeafe; color: #1e40af; }
.staff-notif-type-personal { background: #f3e8ff; color: #6b21a8; }
.staff-notif-time { font-size: 11px; color: #6b7280; }
.staff-notif-subject { font-size: 13px; font-weight: 600; color: #111827; margin-bottom: 2px; }
.staff-notif-snippet { font-size: 12px; color: #4b5563; line-height: 1.4; }
.staff-notif-from { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.staff-notif-footer {
    padding: 10px 14px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.staff-notif-view-all {
    background: none;
    border: none;
    color: var(--staff-accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.staff-notif-view-all:hover { background: #f3f4f6; }

/* Pending Work Pop-up */
.staff-pending-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.staff-pending-list li {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
}
.staff-pending-list li:last-child { border-bottom: none; }
.staff-pending-title { font-size: 14px; font-weight: 600; color: #111827; }
.staff-pending-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }

@media (max-width: 600px) {
    .staff-notif-dropdown {
        width: calc(100vw - 24px);
        right: -8px;
    }
}

/* ===== My Tasks (v3.7.25) ===== */
.staff-stat-clickable { cursor: pointer; transition: transform 0.1s ease, box-shadow 0.15s ease; }
.staff-stat-clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.my-tasks-toolbar {
    display: flex;
    gap: 10px;
    margin: 14px 0 16px;
    flex-wrap: wrap;
}
.my-tasks-search,
.my-tasks-category,
.my-tasks-priority {
    padding: 10px 14px;
    border: 1px solid var(--staff-border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--staff-card);
}
.my-tasks-search { flex: 1; min-width: 220px; }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-card {
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    background: var(--staff-card);
    border: 1px solid var(--staff-border);
    border-left: 3px solid #94a3b8;
    border-radius: 10px;
    align-items: flex-start;
}
.task-card.task-overdue { border-left-color: #ef4444; background: #fef2f2; }
.task-card.task-done { opacity: 0.7; }
.task-card.task-done .task-title { text-decoration: line-through; color: #6b7280; }

.task-card-main { flex: 1; min-width: 0; }
.task-card-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.task-pri {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.task-pri-urgent { background: #fee2e2; color: #991b1b; }
.task-pri-high   { background: #ffedd5; color: #9a3412; }
.task-pri-normal { background: #e0e7ff; color: #3730a3; }
.task-pri-low    { background: #f3f4f6; color: #374151; }

.task-cat {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e5e7eb;
    color: #374151;
}
.task-cat-project_evaluation { background: #fef3c7; color: #92400e; }
.task-cat-ticket             { background: #fee2e2; color: #991b1b; }
.task-cat-class_activity     { background: #dbeafe; color: #1e40af; }
.task-cat-query_handling     { background: #f3e8ff; color: #6b21a8; }
.task-cat-viva               { background: #cffafe; color: #155e75; }
.task-cat-document_request   { background: #fce7f3; color: #9d174d; }
.task-cat-extension_request  { background: #ecfccb; color: #4d7c0f; }

.task-due {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f9fafb;
}
.task-due-overdue { color: #b91c1c; background: #fee2e2; font-weight: 600; }

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    word-wrap: break-word;
}
.task-desc {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 6px;
    white-space: pre-wrap;
}
.task-footer {
    font-size: 11px;
    color: #9ca3af;
}
.task-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
}
.task-delete-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1;
}
.task-delete-btn:hover { background: #fee2e2; color: #991b1b; }

/* Assign Task form */
.assign-task-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.assign-task-grid .full-width { grid-column: 1 / -1; }
.assign-task-grid .staff-form-row { margin: 0; }
.assign-task-grid label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--staff-muted);
    margin-bottom: 4px;
}
.assign-task-grid input,
.assign-task-grid select,
.assign-task-grid textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--staff-card);
    font-family: inherit;
}
.assign-task-grid input:focus,
.assign-task-grid select:focus,
.assign-task-grid textarea:focus {
    outline: none;
    border-color: var(--staff-accent);
}
.assign-task-grid .required { color: #dc2626; }

@media (max-width: 720px) {
    .task-card { flex-direction: column; }
    .task-card-actions { flex-direction: row; align-self: stretch; justify-content: flex-end; }
    .assign-task-grid { grid-template-columns: 1fr; }
}

/* ===== Schedule Viva Modal (v3.7.26) ===== */
.schedule-viva-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #374151;
}
.schedule-viva-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.schedule-viva-grid .full-width { grid-column: 1 / -1; }
.schedule-viva-grid .staff-form-row { margin: 0; }
.schedule-viva-grid label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--staff-muted);
    margin-bottom: 4px;
}
.schedule-viva-grid input,
.schedule-viva-grid select,
.schedule-viva-grid textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--staff-card);
    font-family: inherit;
}
.schedule-viva-grid input:focus,
.schedule-viva-grid select:focus,
.schedule-viva-grid textarea:focus {
    outline: none;
    border-color: var(--staff-accent);
}
.schedule-viva-grid .required { color: #dc2626; }

.schedule-viva-toggles {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.schedule-viva-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.schedule-viva-toggle input { width: auto; }

@media (max-width: 720px) {
    .schedule-viva-grid { grid-template-columns: 1fr; }
}

/* ===== Auto-Attendance UI (v3.7.28) ===== */
.att-auto-banner {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    margin-bottom: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e3a8a;
    font-size: 13px;
}
.att-auto-banner em { font-style: normal; font-weight: 600; color: #1e40af; }
.att-auto-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.att-auto-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #f3f4f6;
    color: #374151;
}
.att-auto-stat.present  { background: #d1fae5; color: #065f46; }
.att-auto-stat.absent   { background: #fee2e2; color: #991b1b; }
.att-auto-stat.enrolled { background: #e0e7ff; color: #3730a3; }
.att-auto-stat strong { font-weight: 700; }

.att-last-synced { font-size: 11px; color: #6b7280; }
.att-not-synced  { font-size: 11px; color: #b91c1c; font-weight: 600; }

.att-row-needs-sync { background: #fffbeb; }
.att-row-needs-sync td { border-top: 1px solid #fde68a; }

@media (max-width: 720px) {
    .att-auto-banner { flex-direction: column; align-items: flex-start; }
}

/* ===== Primary / Secondary Batch labels (v3.7.31) ===== */
.batch-role-help {
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    line-height: 1.5;
}
.batch-role-help strong { color: #0f172a; }

.batch-student-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 6px 8px !important;
    border-bottom: 1px solid #eef2f7;
}
.batch-student-item:last-child { border-bottom: none; }
.batch-student-name { flex: 1; min-width: 0; }
.batch-student-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.batch-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.batch-role-badge.primary   { background: #dcfce7; color: #166534; }
.batch-role-badge.secondary { background: #e0e7ff; color: #3730a3; }

/* ===== Session Notes editor (v3.7.27) ===== */
.staff-btn-success {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}
.staff-btn-success:hover { background: #059669; border-color: #059669; }

/* v3.7.34: warning button (used by Domain Assign + bulk warnings) */
.staff-btn-warning {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}
.staff-btn-warning:hover { background: #d97706; border-color: #d97706; }

.sn-help {
    padding: 10px 12px;
    margin-bottom: 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 12px;
    color: #075985;
    line-height: 1.5;
}
.sn-hint {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--staff-muted);
}

#sn-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--staff-border);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    font-family: inherit;
    resize: vertical;
}

.sn-links-list, .sn-files-list {
    border: 1px dashed var(--staff-border);
    border-radius: 6px;
    padding: 8px;
    background: #fafafa;
    margin-bottom: 8px;
    min-height: 40px;
}
.sn-empty {
    margin: 0;
    color: var(--staff-muted);
    font-size: 12px;
    text-align: center;
}

.sn-link-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
}
.sn-link-row:last-child { margin-bottom: 0; }
.sn-link-row input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--staff-border);
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
}
.sn-link-remove, .sn-file-remove {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 8px;
    border-radius: 4px;
}
.sn-link-remove:hover, .sn-file-remove:hover { background: #fee2e2; color: #991b1b; }

.sn-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 4px;
    margin-bottom: 4px;
}
.sn-file-row:last-child { margin-bottom: 0; }
.sn-file-link {
    flex: 1;
    color: var(--staff-accent);
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sn-file-link:hover { text-decoration: underline; }
.sn-file-size { font-size: 11px; color: var(--staff-muted); }

.sn-upload-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.sn-upload-row input[type="file"] {
    flex: 1;
    min-width: 200px;
    padding: 6px;
    font-size: 12px;
}

/* v3.7.36: read-only link rows for Limited Trainer view */
.sn-link-row-ro {
    display: block !important;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 4px;
    margin-bottom: 4px;
}
.sn-link-row-ro a {
    color: var(--staff-accent);
    text-decoration: none;
    font-size: 13px;
    word-break: break-word;
}
.sn-link-row-ro a:hover { text-decoration: underline; }

/* v3.7.36: stack the editable link-row inputs on narrow screens */
@media (max-width: 600px) {
    .sn-link-row { grid-template-columns: 1fr auto !important; }
    .sn-link-row .sn-link-url { grid-column: 1 / -1; }
    .sn-file-row { flex-wrap: wrap; }
}
