/* ============================================================
   STUDENT PANEL & ADMIN COURSE PANEL - styles
   Loaded only on student-panel and admin-course-orders pages.
   ============================================================ */

/* -- Shared panel variables ----------------------- */
:root {
  --sp-primary:   #0e2a46;
  --sp-accent:    #f4b627;
  --sp-green:     #116e63;
  --sp-danger:    #dc3545;
  --sp-light-bg:  #f4f7f9;
  --sp-border:    #e0e0e0;
  --sp-radius:    8px;
  --sp-shadow:    0 2px 12px rgba(0,0,0,.08);
}

/* -- Shared btn utilities ------------------------- */
.sp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--sp-radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: .25s;
  border: none;
  line-height: 1;
}
.sp-btn-primary         { background: var(--sp-primary); color: #fff !important; }
.sp-btn-primary:hover   { background: #1a3d62; color: #fff !important; }
.sp-btn-outline         { background: transparent; color: var(--sp-primary) !important; border: 2px solid var(--sp-primary); }
.sp-btn-outline:hover   { background: var(--sp-primary); color: #fff !important; }
.sp-btn-danger          { background: var(--sp-danger); color: #fff !important; }
.sp-btn-danger:hover    { background: #b02a37; }
.sp-btn-sm              { padding: 6px 12px; font-size: 12px; }

/* -- Status badges -------------------------------- */
.sp-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sp-status-completed  {Background: #d4edda; color: #155724; }
.sp-status-processing { background: #d1ecf1; color: #0c5460; }
.sp-status-on-hold    { background: #fff3cd; color: #856404; }
.sp-status-pending    { background: #ffeeba; color: #856404; }
.sp-status-cancelled  { background: #f8d7da; color: #721c24; }
.sp-status-refunded   { background: #e2e3e5; color: #383d41; }

/* -- Empty state ---------------------------------- */
.sp-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}
.sp-empty-state .sp-empty-icon {
  font-size: 64px;
  color: #ccc;
  margin-bottom: 20px;
}
.sp-empty-state h3 { margin-bottom: 10px; color: var(--sp-primary); }
.sp-empty-state p  { margin-bottom: 24px; }

/* -- Section title -------------------------------- */
.sp-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--sp-primary);
  margin: 32px 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--sp-accent);
  display: inline-block;
}

/* ================================================================
   STUDENT PANEL
   ================================================================ */
.student-panel-area {
  padding: 60px 0 80px;
  background: var(--sp-light-bg);
  min-height: 70vh;
}

/* Welcome bar */
.sp-welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.sp-welcome-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sp-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--sp-accent);
}
.sp-welcome-text h4 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--sp-primary);
}
.sp-welcome-text p {
  margin: 0;
  font-size: 14px;
  color: #666;
}
.sp-welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Stats bar */
.sp-stats-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.sp-stat-item {
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 18px 28px;
  text-align: center;
  min-width: 140px;
  border-top: 4px solid var(--sp-accent);
}
.sp-stat-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--sp-primary);
  line-height: 1;
}
.sp-stat-label {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Course cards grid */
.sp-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.sp-course-card {
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.sp-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0,0,0,.13);
}
.sp-course-thumb {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #e9eff4;
}
.sp-course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-course-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 48px;
  color: #b0bec5;
  background: linear-gradient(135deg, #e3eaf2, #d0dce9);
}
.sp-course-thumb .sp-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.sp-course-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sp-course-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--sp-primary);
  margin: 0 0 12px;
  line-height: 1.4;
}
.sp-course-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.sp-meta-item {
  font-size: 13px;
  color: #666;
}
.sp-meta-item i {
  width: 16px;
  color: var(--sp-accent);
}
/* Drive link button */
.sp-drive-link {
  margin-bottom: 14px;
}
.sp-btn-drive {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: #1a73e8;
  color: #fff !important;
  border-radius: var(--sp-radius);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .2s;
  border: none;
}
.sp-btn-drive:hover {
  background: #1558b0;
  color: #fff !important;
}
.sp-btn-drive i {
  font-size: 15px;
}

.sp-course-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--sp-border);
  padding-top: 14px;
}
.sp-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--sp-green);
}

/* ================================================================
   UPCOMING CLASSES SECTION
   ================================================================ */
.sp-classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.sp-class-card {
  background: #fff;
  border-radius: var(--sp-radius);
  border: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.sp-class-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* Status banners */
.sp-class-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
}
.sp-class-banner-cancelled {
  background: #f8d7da;
  color: #721c24;
  border-bottom: 1px solid #f5c6cb;
}
.sp-class-banner-rescheduled {
  background: #fff3cd;
  color: #856404;
  border-bottom: 1px solid #ffc107;
}

/* Cancelled / rescheduled card tints */
.sp-class-cancelled {
  border-left: 4px solid #dc3545;
}
.sp-class-rescheduled {
  border-left: 4px solid #ffc107;
}
.sp-class-active {
  border-left: 4px solid var(--sp-green);
}

/* Header */
.sp-class-header {
  padding: 16px 18px 10px;
}
.sp-class-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sp-primary);
  margin: 0 0 8px;
  line-height: 1.4;
}
.sp-class-course-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eef2f7;
  color: #555;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}
.sp-class-course-tag i { color: var(--sp-primary); }

/* Meta (date/time) */
.sp-class-meta {
  padding: 0 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-class-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #555;
}
.sp-class-meta-item i { color: var(--sp-primary); width: 14px; text-align: center; }
.sp-class-old-time {
  text-decoration: line-through;
  color: #aaa;
}
.sp-class-new-time {
  color: var(--sp-green);
  font-weight: 600;
}
.sp-class-new-time i { color: var(--sp-green); }

/* Notice box */
.sp-class-notice {
  margin: 0 18px 12px;
  background: #fff8e1;
  border-left: 3px solid var(--sp-accent);
  padding: 9px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #5d4037;
  display: flex;
  gap: 7px;
}
.sp-class-notice i { color: var(--sp-accent); margin-top: 2px; flex-shrink: 0; }

/* Description */
.sp-class-description {
  padding: 0 18px 12px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Join button */
.sp-btn-zoom {
  margin: auto 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--sp-green);
  color: #fff !important;
  border-radius: var(--sp-radius);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  transition: background .2s;
  border: none;
}
.sp-btn-zoom:hover {
  background: #0d5249;
  color: #fff !important;
}
.sp-btn-zoom i { font-size: 14px; }

/* Pending / locked note */
.sp-class-pending-note {
  margin: auto 18px 18px;
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp-class-pending-note i { color: #bbb; }

@media (max-width: 768px) {
  .sp-classes-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   ADMIN COURSE PANEL
   ================================================================ */
.admin-panel-area {
  padding: 60px 0 80px;
  background: var(--sp-light-bg);
  min-height: 80vh;
}

/* Admin top nav */
.ap-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--sp-primary);
  border-radius: var(--sp-radius) var(--sp-radius) 0 0;
  padding: 16px 24px;
  margin-bottom: 0;
}
.ap-nav-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}
.ap-nav-title i  { margin-right: 8px; color: var(--sp-accent); }
.ap-nav-right    { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ap-top-nav .sp-btn-outline {
  border-color: rgba(255,255,255,.5);
  color: #fff !important;
}
.ap-top-nav .sp-btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
}

/* ---- Segmented tab control ---- */
.ap-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
}
.ap-tabs .ap-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ap-tabs .ap-tab-btn i { font-size: 14px; opacity: .9; }
.ap-tabs .ap-tab-btn:hover { background: rgba(255,255,255,.13); color: #fff; }
.ap-tabs .ap-tab-btn.active { background: var(--sp-accent); color: var(--sp-primary); }

/* Count pill on each tab */
.ap-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.ap-tabs .ap-tab-btn.active .ap-tab-count { background: var(--sp-primary); color: var(--sp-accent); }

/* "NEW" flag on a freshly-added tab */
.ap-tab-new {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #16a34a;
  color: #fff;
  line-height: 1;
}
.ap-tabs .ap-tab-btn.active .ap-tab-new { background: var(--sp-primary); color: #fff; }

/* WP Dashboard link */
.ap-wp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 9px;
  transition: background .15s ease, color .15s ease;
}
.ap-wp-link:hover { background: rgba(255,255,255,.14); color: #fff; }

@media (max-width: 680px) {
  .ap-tabs { width: 100%; justify-content: space-between; }
  .ap-tabs .ap-tab-btn { flex: 1; justify-content: center; padding: 9px 10px; }
  .ap-tab-label { font-size: 13px; }
}

/* ================================================================
   ONLINE CLASSES MANAGEMENT FORM
   ================================================================ */
.ap-class-form-wrap {
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  margin-bottom: 24px;
  overflow: hidden;
}
.ap-class-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f4f8;
  padding: 14px 20px;
  border-bottom: 1px solid var(--sp-border);
}
.ap-class-form-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--sp-primary);
}
.ap-class-form-header h4 i { color: var(--sp-accent); margin-right: 6px; }
.ap-form-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  padding: 2px 6px;
}
.ap-form-close:hover { color: var(--sp-primary); }

#ap-class-form-body { padding: 20px; }

.ap-cf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ap-cf-full {
  grid-column: 1 / -1;
}
.ap-cf-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ap-cf-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
.ap-cf-group .req { color: #dc3545; }
.ap-cf-group input[type=text],
.ap-cf-group input[type=number],
.ap-cf-group input[type=url],
.ap-cf-group input[type=email],
.ap-cf-group input[type=date],
.ap-cf-group input[type=time],
.ap-cf-group input[type=datetime-local],
.ap-cf-group select,
.ap-cf-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.4;
  color: #333;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s;
}
/* Native date/time pickers render their own control height — keep them level
   with the text inputs and selects sitting beside them in the grid. */
.ap-cf-group input[type=date],
.ap-cf-group input[type=time],
.ap-cf-group input[type=datetime-local] {
  min-height: 36px;
  appearance: none;
  -webkit-appearance: none;
}
.ap-cf-group input[type=date]::-webkit-calendar-picker-indicator,
.ap-cf-group input[type=time]::-webkit-calendar-picker-indicator,
.ap-cf-group input[type=datetime-local]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .55;
}
.ap-cf-group input[type=date]:hover::-webkit-calendar-picker-indicator,
.ap-cf-group input[type=time]:hover::-webkit-calendar-picker-indicator,
.ap-cf-group input[type=datetime-local]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* Class Time — two time inputs sharing one grid cell */
.ap-cf-time-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-cf-time-range .ap-cf-time-sep {
  color: #94a3b8;
  font-weight: 600;
  flex: 0 0 auto;
}

/* Class Days — weekday checkboxes as selectable pills */
.ap-cf-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ap-cf-day {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, background .2s, color .2s;
}
.ap-cf-day:hover { border-color: var(--sp-primary); }
.ap-cf-day input { margin: 0; cursor: pointer; }
/* .is-checked is set by JS so the pill state also works without :has() */
.ap-cf-day.is-checked,
.ap-cf-day:has(input:checked) {
  border-color: var(--sp-primary);
  background: rgba(14,42,70,.06);
  color: var(--sp-primary);
}
.ap-cf-group input:focus,
.ap-cf-group select:focus,
.ap-cf-group textarea:focus {
  outline: none;
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 3px rgba(14,42,70,.06);
}
.ap-cf-group textarea { resize: vertical; min-height: 70px; }

.ap-cf-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2e7d32;
  cursor: pointer;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 6px;
  padding: 10px 14px;
}
.ap-cf-check-label input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; }

.ap-cf-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--sp-border);
}
.ap-cf-feedback {
  font-size: 13px;
  font-weight: 600;
}

/* Classes table specific */
.ap-classes-table th,
.ap-classes-table td {
  font-size: 13px;
}

@media (max-width: 768px) {
  .ap-cf-grid {
    grid-template-columns: 1fr;
  }
  .ap-cf-full {
    grid-column: 1;
  }
}

/* Summary cards */
.ap-summary-cards {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  background: #fff;
  border-left: 1px solid var(--sp-border);
  border-right: 1px solid var(--sp-border);
  margin-bottom: 24px;
  box-shadow: var(--sp-shadow);
}
.ap-summary-card {
  flex: 1;
  min-width: 120px;
  padding: 20px 12px;
  text-align: center;
  border-right: 1px solid var(--sp-border);
  border-bottom: 4px solid transparent;
  text-decoration: none !important;
  transition: .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #444 !important;
}
.ap-summary-card:last-child          { border-right: none; }
.ap-summary-card:hover,
.ap-summary-card.active              { background: #f8f9fa; }
.ap-summary-card i                   { font-size: 24px; margin-bottom: 4px; }
.ap-card-count                       { font-size: 28px; font-weight: 800; line-height: 1; }
.ap-card-label                       { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #888; }

.ap-card-green.active,  .ap-card-green:hover  { border-bottom-color: #28a745; }
.ap-card-blue.active,   .ap-card-blue:hover   { border-bottom-color: #17a2b8; }
.ap-card-orange.active, .ap-card-orange:hover { border-bottom-color: #fd7e14; }
.ap-card-yellow.active, .ap-card-yellow:hover { border-bottom-color: var(--sp-accent); }
.ap-card-red.active,    .ap-card-red:hover    { border-bottom-color: var(--sp-danger); }

.ap-card-green  i { color: #28a745; }
.ap-card-blue   i { color: #17a2b8; }
.ap-card-orange i { color: #fd7e14; }
.ap-card-yellow i { color: var(--sp-accent); }
.ap-card-red    i { color: var(--sp-danger); }

/* Filter bar */
.ap-filter-bar {
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.ap-filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.ap-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}
.ap-filter-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #555;
  letter-spacing: .5px;
}
.ap-input {
  height: 40px;
  font-size: 13px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  padding: 6px 12px;
}
.ap-input:focus { border-color: var(--sp-primary); box-shadow: none; outline: none; }
.ap-filter-actions {
  flex-direction: row !important;
  min-width: auto;
  flex: 0;
}

/* Results info */
.ap-results-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #555;
}
.ap-clear-filter {
  color: var(--sp-danger);
  font-size: 13px;
}

/* Orders table */
.ap-table-wrap {
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  overflow-x: auto;
  margin-bottom: 24px;
}
.ap-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ap-orders-table thead tr {
  background: var(--sp-primary);
  color: #fff;
}
.ap-orders-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ap-orders-table tbody tr {
  border-bottom: 1px solid var(--sp-border);
  transition: background .15s;
}
.ap-orders-table tbody tr:hover  { background: #f8f9fa; }
.ap-orders-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  color: #444;
}
.ap-order-id a     { font-weight: 700; color: var(--sp-primary); }
.ap-customer-name  { font-weight: 600; }
.ap-course-title   { font-weight: 600; color: var(--sp-green); max-width: 200px; }
.ap-amount         { font-weight: 700; color: var(--sp-green); white-space: nowrap; }
.ap-na             { color: #bbb; }
.ap-board-badge {
  display: inline-block;
  background: var(--sp-primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.ap-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.ap-action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f0f2f5;
  color: var(--sp-primary) !important;
  transition: .2s;
  text-decoration: none !important;
}
.ap-action-btn:hover { background: var(--sp-primary); color: #fff !important; }

/* Pagination */
.ap-pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 16px;
}
.ap-page-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fff;
  color: var(--sp-primary) !important;
  border: 1px solid var(--sp-border);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: .2s;
}
.ap-page-btn:hover,
.ap-page-btn.active {
  background: var(--sp-primary);
  color: #fff !important;
  border-color: var(--sp-primary);
}

/* -- Responsive ----------------------------------- */
@media (max-width: 768px) {
  .sp-welcome-bar     { flex-direction: column; align-items: flex-start; }
  .sp-welcome-actions { width: 100%; }
  .sp-courses-grid    { grid-template-columns: 1fr; }
  .ap-summary-cards   { flex-wrap: wrap; }
  .ap-summary-card    { min-width: 45%; flex: 0 0 45%; }
  .ap-filter-row      { flex-direction: column; }
  .ap-orders-table thead { display: none; }
  .ap-orders-table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
  }
  .ap-orders-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--sp-border);
  }
  .ap-orders-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    margin-right: 8px;
    white-space: nowrap;
  }
}

/* ================================================================
   MY BATCHES — student panel batch cards
   ================================================================ */
.sp-batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.sp-batch-card {
  background: #fff;
  border-radius: var(--sp-radius);
  border: 1px solid var(--sp-border);
  border-left: 4px solid var(--sp-primary);
  box-shadow: var(--sp-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.sp-batch-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.11);
}

.sp-batch-card-header {
  padding: 16px 18px 10px;
}
.sp-batch-board-badge {
  display: inline-block;
  background: var(--sp-primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}
.sp-batch-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--sp-primary);
  line-height: 1.4;
}

.sp-batch-meta {
  padding: 0 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sp-batch-datetime {
  color: var(--sp-primary) !important;
  font-weight: 600;
}
.sp-batch-details {
  padding: 0 18px 10px;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}
.sp-batch-actions {
  margin-top: auto;
  padding: 12px 18px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--sp-border);
}

/* ================================================================
   DETAIL PAGES (course-detail & batch-detail)
   ================================================================ */
.sp-detail-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

.sp-detail-main { min-width: 0; }

/* Header card */
.sp-detail-header-card {
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 28px 30px;
  margin-bottom: 24px;
}
.sp-detail-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--sp-primary);
  margin: 0 0 14px;
  line-height: 1.3;
}
.sp-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sp-detail-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2f7;
  color: #444;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.sp-detail-meta-chip i    { color: var(--sp-primary); }
.sp-chip-time             { background: #e8f5e9; color: var(--sp-green); }
.sp-chip-time i           { color: var(--sp-green); }

/* Section spacing */
.sp-detail-section {
  margin-bottom: 24px;
}

/* Content card */
.sp-detail-card {
  background: #fff;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 22px 26px;
}
.sp-detail-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sp-primary);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--sp-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-detail-section-title i { color: var(--sp-accent); }
.sp-detail-body {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
}

/* Zoom button large */
.sp-btn-zoom-lg {
  display: inline-flex;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--sp-radius);
  background: var(--sp-green);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  gap: 10px;
  transition: background .2s;
}
.sp-btn-zoom-lg:hover { background: #0d5249; color: #fff !important; }

/* YouTube embed list */
.sp-yt-list { display: flex; flex-direction: column; gap: 16px; }
.sp-yt-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
.sp-yt-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.sp-yt-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #c00 !important;
  word-break: break-all;
}
.sp-yt-link i { font-size: 18px; }

/* Sidebar card */
.sp-sidebar-card { position: sticky; top: 20px; }
.sp-sidebar-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
}
.sp-sidebar-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.sp-sidebar-list li:last-child { border-bottom: none; }
.sp-sidebar-list li span { color: #888; white-space: nowrap; }
.sp-sidebar-list li strong { color: var(--sp-primary); text-align: right; }

/* Responsive */
@media (max-width: 900px) {
  .sp-detail-wrap {
    grid-template-columns: 1fr;
  }
  .sp-sidebar-card { position: static; }
  .sp-batches-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   SUBSCRIPTION PRICING PAGE
   ================================================================ */

/* Alert banners */
.sub-alert {
  display: flex;
  gap: 18px;
  padding: 20px 24px;
  border-radius: var(--sp-radius);
  margin-bottom: 32px;
  align-items: flex-start;
}
.sub-alert > i { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.sub-alert p   { margin: 4px 0 0; font-size: 14px; }
.sub-alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.sub-alert-success > i { color: #28a745; }
.sub-alert-warning { background: #fff3cd; border: 1px solid #ffc107; color: #856404; }
.sub-alert-warning > i { color: #856404; }

/* Intro text */
.sub-intro-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 0;
}

/* Plans grid */
.sub-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

/* Plan card */
.sub-plan-card {
  background: #fff;
  border: 2px solid var(--sp-border);
  border-radius: 14px;
  padding: 32px 24px 24px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.sub-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,.12);
}
.sub-plan-featured {
  border-color: var(--sp-primary);
  box-shadow: 0 4px 20px rgba(14,42,70,.15);
  transform: scale(1.04);
}
.sub-plan-featured:hover { transform: scale(1.04) translateY(-4px); }

/* Badge */
.sub-plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sp-accent);
  color: var(--sp-primary);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

.sub-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--sp-primary);
  margin: 0 0 10px;
  text-align: center;
}
.sub-plan-discount {
  display: table;
  margin: 0 auto 12px;
  background: #e8f5e9;
  color: #28a745;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}

/* Price display */
.sub-plan-price {
  text-align: center;
  margin-bottom: 4px;
  line-height: 1;
}
.sub-plan-per-month {
  font-size: 44px;
  font-weight: 800;
  color: var(--sp-primary);
}
.sub-plan-per-label {
  font-size: 14px;
  color: #888;
  margin-left: 2px;
}
.sub-plan-charge {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}
.sub-plan-tagline {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-bottom: 20px;
  min-height: 34px;
}

/* Feature list */
.sub-plan-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.sub-plan-features li {
  font-size: 13px;
  color: #555;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-plan-features li:last-child { border-bottom: none; }
.sub-plan-features i { color: var(--sp-green); }

/* Current subscription card */
.sub-current-card {
  background: #fff;
  border: 2px solid var(--sp-green);
  border-radius: 12px;
  padding: 28px 30px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  box-shadow: var(--sp-shadow);
}
.sub-current-icon {
  font-size: 52px;
  color: var(--sp-green);
  flex-shrink: 0;
  line-height: 1;
}
.sub-current-info { flex: 1; min-width: 200px; }
.sub-current-info h3 {
  color: var(--sp-primary);
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}
.sub-current-info p { margin: 4px 0; font-size: 14px; color: #555; }
.sub-current-actions { flex-shrink: 0; }

/* Responsive */
@media (max-width: 900px) {
  .sub-plans-grid       { grid-template-columns: 1fr; }
  .sub-plan-featured    { transform: none; }
  .sub-plan-featured:hover { transform: translateY(-4px); }
  .sub-current-card     { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .sub-plans-grid { grid-template-columns: repeat(2, 1fr); }
}
