/* CBSE Floating Dock & Table Highlight Styles */
#apaar-cbse-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #212529;
}

/* Minimized Pill Bar */
.apaar-cbse-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #0784f9;
  border-radius: 50px;
  padding: 4px 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(7, 132, 249, 0.25);
  user-select: none;
}

.apaar-pill-btn-fill {
  background: linear-gradient(135deg, #0784f9, #0056b3);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.apaar-pill-btn-fill:hover {
  background: #004da3;
  transform: scale(1.03);
}

.apaar-pill-btn-open {
  background: #f0f7ff;
  color: #0784f9;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
}

.apaar-pill-btn-open:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.apaar-pill-btn-open.active {
  background: #0784f9;
  color: #ffffff;
  border-color: #0784f9;
}

.apaar-cbse-dock {
  position: fixed;
  bottom: 72px;
  right: 20px;
  width: 340px;
  max-height: calc(100vh - 90px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22), 0 3px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #c2d6e8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 9999998;
  animation: apaarFadeUp 0.18s ease-out both;
}

@keyframes apaarFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.apaar-cbse-header {
  background: linear-gradient(135deg, #0784f9, #0056b3);
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apaar-cbse-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.apaar-cbse-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#apaar-cbse-toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

#apaar-cbse-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.apaar-dock-header-help-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #ffffff;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.apaar-dock-header-help-btn:hover {
  background: #ffffff;
  color: #0784f9;
  border-color: #ffffff;
  transform: translateY(-1px);
}

.apaar-cbse-body {
  padding: 14px;
  overflow-y: auto;
  background: #fbfcfe;
}

.apaar-cbse-card {
  background: #f0f7ff;
  border: 1px solid #d0e4fa;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-count-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.apaar-icon-btn {
  background: #ffffff;
  border: 1px solid #9ec5fe;
  color: #0784f9;
  border-radius: 6px;
  cursor: pointer;
  padding: 3px 7px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.apaar-icon-btn:hover {
  background: #e7f1ff;
  border-color: #0784f9;
  transform: scale(1.08);
}

.card-label {
  font-size: 13px;
  font-weight: 600;
  color: #0b3d68;
}

.apaar-dock-plan-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #d0e4fa;
  border-radius: 6px;
  padding: 7px 9px;
  margin: 6px 0 8px 0;
  gap: 6px;
  min-width: 0;
}

.apaar-dock-plan-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
  min-width: 0;
}

.apaar-dock-plan-title {
  font-size: 11px;
  font-weight: 700;
  color: #0b3d68;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.apaar-dock-plan-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding-top: 5px;
  border-top: 1px dashed #dbeafe;
}

.apaar-dock-sub-btn {
  background: #ffffff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.apaar-dock-sub-btn:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

.apaar-dock-upgrade-btn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
  font-weight: 700;
}

.apaar-dock-upgrade-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.apaar-dock-upgrade-btn.btn-renew {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  font-weight: 700;
}

.apaar-dock-upgrade-btn.btn-renew:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.card-val {
  font-size: 18px;
  font-weight: 800;
  color: #0784f9;
}

.card-sub {
  font-size: 11px;
  color: #6c757d;
  margin-top: 3px;
  word-break: break-all;
}

.apaar-cbse-btn-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
}

.apaar-cbse-btn-grid .apaar-btn {
  padding: 5px 10px;
  font-size: 11.5px;
  height: 30px;
  min-height: 30px;
  border-radius: 5px;
  box-sizing: border-box;
}

.apaar-cbse-section {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: #495057;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.section-summary {
  font-size: 12px;
  font-weight: 600;
  color: #0d6efd;
  cursor: pointer;
}

.form-label-sm {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
  display: block;
}

.apaar-select, .apaar-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
}

.apaar-select:focus, .apaar-input:focus {
  outline: none;
  border-color: #0784f9;
  box-shadow: 0 0 0 2px rgba(7, 132, 249, 0.2);
}

.apaar-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  transition: all 0.2s ease;
}

.apaar-btn-large {
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
}

.apaar-btn-primary {
  background-color: #0784f9;
  color: #ffffff;
}

.apaar-btn-primary:hover {
  background-color: #006dd6;
}

.apaar-btn-outline {
  background-color: #ffffff;
  color: #0784f9;
  border: 1px solid #0784f9;
}

.apaar-btn-outline:hover {
  background-color: #f0f7ff;
}

.apaar-btn-danger {
  background-color: #fff1f2;
  color: #dc3545;
  border: 1px solid #fecdd3;
}

.apaar-btn-danger:hover {
  background-color: #fee2e2;
}

.apaar-btn-secondary {
  background-color: #f1f3f5;
  color: #495057;
  border: 1px solid #ced4da;
  width: 100%;
}

.cb-label {
  font-size: 11px;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.teacher-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apaar-cbse-status {
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
}

.status-success {
  background: #e8f5e9;
  border-color: #c8e6c9;
  color: #1b5e20;
}

.status-warning {
  background: #fff8e1;
  border-color: #ffecb3;
  color: #b78103;
}

.status-error {
  background: #ffebee;
  border-color: #ffcdd2;
  color: #b71c1c;
}

/* CBSE Table Row Enhancements */
tr.apaar-row-matched {
  background-color: #e8f8f0 !important;
}

tr.apaar-row-no-apaar {
  background-color: #f0f7ff !important;
}

tr.apaar-row-partial {
  background-color: #fff9e6 !important;
  border: 2px solid #ffb74d !important;
}

.apaar-match-badge {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
  line-height: 1.3;
}

.badge-success {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #a3cfbb;
}

.badge-info {
  background-color: #cfe2ff;
  color: #084298;
  border: 1px solid #9ec5fe;
}

.badge-warning {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
}

.badge-danger {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.badge-neutral {
  background-color: #e9ecef;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }

/* Override Buttons */
.apaar-btn-override {
  background: #d97706;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.apaar-btn-override:hover {
  background: #b45309;
}

.apaar-btn-warning {
  background-color: #f59e0b;
  color: #ffffff;
  border: 1px solid #d97706;
}

.apaar-btn-warning:hover {
  background-color: #d97706;
}

/* Modal Overlay & Table */
.apaar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apaar-modal-card {
  background: #ffffff;
  width: 90%;
  max-width: 820px;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.apaar-modal-header {
  background: linear-gradient(135deg, #0784f9, #1d5c88);
  color: #ffffff;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apaar-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.apaar-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apaar-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.apaar-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.apaar-modal-table-wrap {
  flex: 1;
  overflow-y: auto;
  max-height: 60vh;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.apaar-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.apaar-modal-table th {
  background: #f1f5f9;
  padding: 8px 10px;
  font-weight: 700;
  color: #334155;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
  position: sticky;
  top: 0;
}

.apaar-modal-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.apaar-modal-table tr:hover {
  background-color: #f8fafc;
}

/* Pro Upgrade Modal Styling */
.apaar-pro-modal-card {
  background: #ffffff;
  width: 95%;
  max-width: 960px;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.apaar-pro-header {
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apaar-pro-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.apaar-pro-header p {
  font-size: 12px;
  margin: 4px 0 0 0;
  opacity: 0.9;
}

.apaar-pro-body {
  padding: 18px 20px;
  overflow-y: auto;
  background: #fafafc;
}

/* Trial Quota Notice */
.pro-quota-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pro-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 840px) {
  .pro-pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .pro-pricing-grid {
    grid-template-columns: 1fr;
  }
}

.pro-plan-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.pro-plan-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.14);
  transform: translateY(-2px);
}

.pro-plan-card.selected {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.18) !important;
}

.pro-plan-selected-tick {
  position: absolute;
  top: -10px;
  left: 12px;
  background: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
  z-index: 2;
}

.pro-plan-select-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  padding: 4px;
  border-top: 1px dashed #e2e8f0;
}

.pro-plan-inline-pay-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #bbf7d0;
}

.pro-btn-inline-pay {
  width: 100%;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
  transition: all 0.2s;
}

.pro-btn-inline-pay:hover {
  background: linear-gradient(135deg, #15803d, #166534);
  transform: scale(1.02);
  box-shadow: 0 5px 12px rgba(22, 163, 74, 0.4);
}

.pro-plan-card.featured {
  border-color: #0284c7;
  background: #f0f9ff;
}

.pro-badge-popular {
  position: absolute;
  top: -9px;
  right: 12px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  z-index: 1;
}

.pro-plan-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.pro-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 2px 0;
}

.pro-original-price {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.pro-plan-price {
  font-size: 22px;
  font-weight: 800;
  color: #0284c7;
}

.pro-discount-pill {
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 10px;
}

.pro-offer-banner {
  font-size: 11px;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  border: 1px dashed #fed7aa;
  padding: 4px 8px;
  border-radius: 6px;
  margin: 4px 0 6px 0;
}

.pro-plan-validity {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.pro-plan-features {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

.pro-plan-features li {
  font-size: 11px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.pro-plan-features li::before {
  content: "✔";
  color: #0284c7;
  font-size: 10px;
  font-weight: bold;
}

/* Fair Quota Guarantee Notice */
.pro-fair-quota-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Payment & Activation Actions */
.pro-actions-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.pro-action-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.pro-btn-pay {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.pro-btn-pay:hover {
  background: #0284c7;
}

.pro-btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.pro-btn-whatsapp:hover {
  background: #1eb956;
}

/* License Key Input Box */
.pro-activate-box {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.pro-activate-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.pro-key-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  text-transform: uppercase;
}

.pro-btn-activate {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pro-btn-activate:hover {
  background: #1e293b;
}

.pro-activate-msg {
  font-size: 11px;
  margin-top: 6px;
}

.msg-pro-success {
  color: #15803d;
  font-weight: 600;
}

.msg-pro-error {
  color: #b91c1c;
  font-weight: 600;
}



