.app-boot-loader{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:9999}.app-boot-loader__svg{animation:app-boot-spin .9s linear infinite}@keyframes app-boot-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.teacher-topbar-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;border:none;background:rgba(0,0,0,0);cursor:pointer;color:#4b5563;transition:background 120ms ease,color 120ms ease}.teacher-topbar-icon-btn:hover{background:#f3f4f6;color:#111827}.teacher-topbar-icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.teacher-topbar-notifications-popover{min-width:280px}.teacher-topbar-notifications-popover__empty{padding:20px 16px;text-align:center;color:#6b7280;font-size:13px}
/* Parent Dashboard Styles */
.parent-dashboard {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.dashboard-sidebar {
    width: 280px;
    left: 0;
    top: 0;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 120;
    position: fixed;
    /* or fixed if you want it to always stay visible on scroll */
}

.sidebar-header {
    padding: 16px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-header h4 {
    margin: 0;
    color: #007FA3;
    font-weight: 600;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 4px 8px;
    border-radius: 8px;
    color: #666;
}

.sidebar-item:hover {
    background: rgba(24, 144, 255, 0.1);
    color: #007FA3;
    transform: translateX(4px);
}

.sidebar-item.active {
    background: #007FA3;
    color: white;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.sidebar-item svg {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-item span {
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Main Content Styles */
.dashboard-main {
    flex: 1;
    background: #f5f5f5;
    overflow-y: auto;
}

.main-header {
    background: white;
    padding: 24px 32px;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.main-header h2 {
    margin: 0;
    color: #262626;
}

.main-content {
    padding: 24px 32px;
}

/* Dashboard Content Styles */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-row {
    margin-bottom: 24px;
}

.stat-card {
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card .ant-statistic-title {
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.stat-card .ant-statistic-content {
    font-size: 32px;
    font-weight: 700;
}

.children-card,
.history-card,
.study-results-card {
    margin-bottom: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.child-item {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.child-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.child-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.child-details {
    flex: 1;
}

.child-details h5 {
    margin: 0 0 8px 0;
    color: #262626;
}

.child-details .ant-typography {
    display: block;
    margin-bottom: 4px;
}

/* Table Styles */
.custom-table .ant-table {
    border-radius: 8px;
    overflow: auto;
}

.ant-table-thead>tr>th {
    background: #fafafa;
    font-weight: 600;
    color: #262626;
}

.ant-table-tbody>tr:hover>td {
    background: rgba(24, 144, 255, 0.05);
}

/* Badge and Tag Styles */
.ant-badge-status-text {
    font-weight: 500;
}

/* Button Styles */
.ant-btn {
    border-radius: 6px;
    font-weight: 500;
}

.ant-btn-primary {
    background: #007FA3;
    border-color: #007FA3;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.ant-btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

/* Card Styles */
.ant-card {
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.ant-card-head {
    border-bottom: 1px solid #e8e8e8;
    padding: 0 24px;
}

.ant-card-head-title {
    font-weight: 600;
    color: #262626;
}

.ant-card-body {
    padding: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        height: auto;
        order: 2;
    }

    .dashboard-main {
        order: 1;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 16px;
    }

    .sidebar-item {
        flex-shrink: 0;
        margin: 0 8px 0 0;
        white-space: nowrap;
    }

    .main-content {
        padding: 16px;
    }

    .stats-row {
        margin-bottom: 16px;
    }

    .user-profile {
        flex-direction: column;
        text-align: center;
    }

    .child-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Custom Scrollbar */
.dashboard-main::-webkit-scrollbar {
    width: 8px;
}

.dashboard-main::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dashboard-main::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dashboard-main::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.parent-layout-root {
    min-height: 100vh;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.parent-header {
    position: sticky;
    top: 0;
    z-index: 110;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.parent-main-content {
    z-index: 100;
    position: relative;
    flex: 1;
    min-height: 0;
    padding: 0;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    margin-left: 280px;
}
/* Fade in from left */
.fade-in-left {
    animation: fadeInLeft 1s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade in from right */
.fade-in-right {
    animation: fadeInRight 1s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from top */
.slide-in-top {
    animation: slideInTop 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General fade in */
.fade-in {
    animation: fadeIn 1.2s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Button pulse animation */
.pulse-animation {
    transition: all 0.3s ease;
}

.pulse-animation:hover {
    transform: scale(1.03);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Parent register container */
.parent-register-container {
    overflow: hidden;
}

/* Success message animation */
.success-message {
    animation: successFadeIn 0.5s ease-out forwards;
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
.register-content {
    padding-top: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.register-option {
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.register-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.register-icon {
    font-size: 48px;
    color: #007FA3;
    margin-bottom: 16px;
}

.register-option h4 {
    margin: 0 0 8px 0;
    color: #262626;
}

.register-option .ant-typography {
    color: #666;
}

.register-custom-input .ant-input {
    min-width: 300px !important;
    padding-left: 11px !important;
    padding-right: 11px !important;
}

.register-custom-input .ant-input {
    width: -moz-fit-content;
    width: fit-content;
}

.register-class-form.ant-card,
.register-class-form.ant-card .ant-card-body {
    border-radius: 0 !important;
    min-height: 90vh !important;
    max-height: 140vh !important;
}

.disabled-card {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Table Styles */
.custom-table .ant-table {
    border-radius: 8px;
    overflow: auto;
}

.long-text {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.weekly-roadmap-page{padding:16px;max-width:100%}.roadmap-goal-banner{background:#fff;border-radius:10px;border:1px solid #e5e7eb;padding:20px 24px;margin-bottom:16px}.roadmap-goal-banner__header{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:14px}.roadmap-goal-banner__title{font-size:1rem;font-weight:700;color:#1f2937;flex:1;min-width:180px}.roadmap-goal-banner__week-badge{display:inline-flex;align-items:center;background:#e0f2fe;color:#007fa3;border:1px solid #007fa3;border-radius:12px;padding:2px 12px;font-size:12px;font-weight:600;white-space:nowrap}.roadmap-goal-banner__progress-row{margin-bottom:16px}.roadmap-goal-banner__progress-label{font-size:12px;color:#6b7280;margin-bottom:4px}.roadmap-goal-banner__smart-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));gap:10px}.roadmap-goal-banner__smart-item{background:#f9fafb;border-radius:6px;padding:10px 12px;font-size:.8125rem}.roadmap-goal-banner__smart-label{font-size:11px;font-weight:700;text-transform:uppercase;color:#007fa3;margin-bottom:4px;letter-spacing:.04em}.roadmap-goal-banner__smart-value{color:#1f2937;line-height:1.4}.roadmap-day-list{display:flex;flex-direction:column;gap:8px}.roadmap-day{background:#fff;border-radius:10px;border:1px solid #e5e7eb;overflow:hidden;transition:border-color .15s ease}.roadmap-day--today{border-color:#007fa3;box-shadow:0 0 0 1px #007fa3}.roadmap-day--past{opacity:.65}.roadmap-day__header{display:flex;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;user-select:none}.roadmap-day__header:hover{background:#f3f4f6}.roadmap-day__date-chip{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;min-width:44px;height:44px;border-radius:8px;background:#f9fafb;border:1px solid #e5e7eb;font-size:11px;color:#6b7280;line-height:1.2}.roadmap-day--today .roadmap-day__date-chip{background:#e0f2fe;border-color:#007fa3;color:#007fa3}.roadmap-day--past .roadmap-day__date-chip{background:#f9fafb}.roadmap-day__date-num{font-size:18px;font-weight:700;line-height:1}.roadmap-day__date-label{font-size:10px;text-transform:uppercase;font-weight:600;letter-spacing:.04em}.roadmap-day__title{flex:1;font-size:.9375rem;font-weight:600;color:#1f2937}.roadmap-day__today-tag{font-size:11px;font-weight:700;color:#007fa3;background:#e0f2fe;border-radius:6px;padding:2px 8px}.roadmap-day__expand-icon{color:#9ca3af;font-size:12px;transition:transform .2s ease}.roadmap-day__expand-icon--open{transform:rotate(180deg)}.roadmap-day__body{padding:0 16px 12px;border-top:1px solid #e5e7eb}.roadmap-activity{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid #f3f4f6}.roadmap-activity:last-child{border-bottom:none}.roadmap-activity--complete{opacity:.55}.roadmap-activity__icon{font-size:18px;width:28px;text-align:center;flex-shrink:0;padding-top:1px}.roadmap-activity__content{flex:1;min-width:0}.roadmap-activity__title{font-size:.875rem;font-weight:600;color:#1f2937;margin-bottom:3px;line-height:1.3}.roadmap-activity--complete .roadmap-activity__title{text-decoration:line-through;color:#6b7280}.roadmap-activity__meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.roadmap-activity__type-chip{font-size:11px;font-weight:500;color:#007fa3;background:#e0f2fe;border-radius:4px;padding:1px 6px}.roadmap-activity__duration-chip{font-size:11px;color:#6b7280;background:#f9fafb;border-radius:4px;padding:1px 6px}.roadmap-activity__checkbox{flex-shrink:0;padding-top:2px}.roadmap-parent-badge{display:inline-flex;align-items:center;gap:6px;background:#fff7e6;border:1px solid #ffc069;border-radius:8px;padding:4px 12px;font-size:12px;font-weight:600;color:#d46b08;margin-bottom:12px}.roadmap-regenerate-area{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:12px;flex-wrap:wrap}.roadmap-regenerate-count{font-size:12px;color:#6b7280}.roadmap-empty{text-align:center;padding:48px 16px;color:#9ca3af}.roadmap-empty__icon{font-size:40px;margin-bottom:12px}.roadmap-empty__title{font-size:.9375rem;font-weight:600;color:#1f2937;margin-bottom:4px}.roadmap-empty__subtitle{font-size:.8125rem;color:#6b7280}@media(max-width: 767px){.roadmap-goal-banner{padding:14px 16px}.roadmap-goal-banner__smart-grid{grid-template-columns:1fr}}
.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.user-profile-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-details h3 {
    margin: 0 0 8px 0;
    color: #262626;
}

.user-details .ant-typography {
    display: block;
    margin-bottom: 4px;
    color: #666;
}
.custom-ant-card .ant-card-body {
    padding: 10px !important;
}
/* ELMS-1268 — Batch Assignment styles.
   Extends action-card.css and ai-tutor-panel.css visual language.
   Global CSS (no modules — workspace rule). */

/* ── Proactive message bubble ────────────────────────────────────────────────
   Rendered as an AI bubble in the chat, with action buttons below text. */

.batch-proactive {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.batch-proactive__text {
  font-size: 13.5px;
  color: #111827;
  line-height: 1.5;
  margin: 0;
}

.batch-proactive__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-proactive__show-btn {
  flex: 1;
  min-width: 120px;
  background: linear-gradient(135deg, #337fa3, #285a76);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 150ms ease;
}

.batch-proactive__show-btn:hover {
  opacity: 0.9;
}

.batch-proactive__show-btn.focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.batch-proactive__show-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.batch-proactive__dismiss-btn {
  background: none;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.batch-proactive__dismiss-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.batch-proactive__dismiss-btn.focus-visible {
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

.batch-proactive__dismiss-btn:focus-visible {
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

/* ── Proactive pulse badge overlay (AC5) ──────────────────────────────────────
   Small dot overlaid on the AITutorTrigger when proactiveBadgeActive=true. */

.ai-tutor-trigger__proactive-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f97316; /* orange accent — distinct from existing blue */
  border: 2px solid #ffffff;
  z-index: 2;
  animation: batch-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes batch-badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-tutor-trigger__proactive-badge {
    animation: none;
  }
}

/* ── BatchActionCard ─────────────────────────────────────────────────────────
   Wrapper around 3 BatchSubCards + footer. */

.batch-action-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border: 1.5px solid #e0f0f8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(51, 127, 163, 0.12);
  width: 100%;
  max-width: 400px;
  font-size: 13px;
}

.batch-action-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 8px;
  background: linear-gradient(135deg, rgba(51, 127, 163, 0.1), rgba(40, 90, 118, 0.07));
  border-bottom: 1px solid #e0f0f8;
}

.batch-action-card__header-label {
  font-size: 11px;
  font-weight: 700;
  color: #285a76;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.batch-action-card__header-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #337fa3;
  background: rgba(51, 127, 163, 0.1);
  border-radius: 10px;
  padding: 1px 8px;
}

.batch-action-card__sub-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.batch-action-card__footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid #f3f4f6;
}

.batch-action-card__execute-all-btn {
  background: linear-gradient(135deg, #337fa3, #285a76) !important;
  border-color: transparent !important;
}

.batch-action-card__execute-all-btn {
  flex: 2;
  font-weight: 600;
  font-size: 12.5px;
}

.batch-action-card__execute-all-btn:not(:disabled):hover {
  opacity: 0.9;
}

.batch-action-card__expand-btn {
  flex: 1;
  font-size: 12.5px;
  border-color: #d1d5db;
  color: #374151;
}

/* ── BatchSubCard ────────────────────────────────────────────────────────────
   Slim variant of ActionCardPreview. Separated by a divider. */

.batch-sub-card {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.batch-sub-card:last-child {
  border-bottom: none;
}

.batch-sub-card--skipped {
  opacity: 0.5;
}

.batch-sub-card__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.batch-sub-card__student-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.batch-sub-card__risk-badge {
  font-size: 10px;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  border-radius: 4px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.batch-sub-card__label {
  font-size: 11.5px;
  color: #6b7280;
  flex-shrink: 0;
}

.batch-sub-card__value {
  font-size: 12px;
  font-weight: 500;
  color: #111827;
}

.batch-sub-card__code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10.5px;
  background: rgba(51, 127, 163, 0.07);
  border: 1px solid rgba(51, 127, 163, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  color: #285a76;
  word-break: break-all;
}

.batch-sub-card__skip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.batch-sub-card__skip-label {
  font-size: 11.5px;
  color: #6b7280;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

/* ── BatchResultSummary ───────────────────────────────────────────────────────
   Rendered below the BatchActionCard after execution settles. */

.batch-result-summary {
  padding: 14px;
  border-radius: 10px;
  margin-top: 8px;
  width: 100%;
  max-width: 400px;
}

.batch-result-summary--success {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}

.batch-result-summary--partial {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
}

.batch-result-summary--failed {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
}

.batch-result-summary__icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.batch-result-summary__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.batch-result-summary__subtitle {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 10px;
}

.batch-result-summary__failed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.batch-result-summary__failed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #991b1b;
}

.batch-result-summary__retry-btn {
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #dc2626;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 150ms ease;
  flex-shrink: 0;
}

.batch-result-summary__retry-btn:hover {
  background: #fee2e2;
}

.batch-result-summary__retry-btn.focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.batch-result-summary__retry-btn:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.batch-result-summary__retry-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── BatchExpandedView ────────────────────────────────────────────────────────
   Per-student detail cards in individual mode (ELMS-1296).
   Each card shows ActionCardPreview + "Xác nhận" / "Chỉnh sửa" / "Bỏ qua" buttons. */

.batch-expanded-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.batch-expanded-view__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}

.batch-expanded-view__back-btn {
  background: none;
  border: none;
  color: #337fa3;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.batch-expanded-view__back-btn.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.batch-expanded-view__back-btn:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.batch-expanded-view__header-label {
  font-size: 11.5px;
  color: #6b7280;
  margin-left: auto;
}

/* Individual student card */
.batch-expanded-view__student-card {
  border: 1.5px solid #e0f0f8;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(51, 127, 163, 0.08);
  transition: opacity 180ms ease, border-color 180ms ease;
}

.batch-expanded-view__student-card--skipped {
  opacity: 0.55;
  border-color: #d1d5db;
}

.batch-expanded-view__student-card--done {
  border-color: #86efac;
}

.batch-expanded-view__student-card--failed {
  border-color: #fca5a5;
}

/* Status row (done / failed / executing / skipped) */
.batch-expanded-view__status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
}

.batch-expanded-view__status--done {
  background: #f0fdf4;
  color: #15803d;
}

.batch-expanded-view__status--failed {
  background: #fef2f2;
  color: #dc2626;
}

.batch-expanded-view__status--executing {
  background: rgba(51, 127, 163, 0.05);
  color: #337fa3;
}

.batch-expanded-view__status--skipped {
  background: #f9fafb;
  color: #9ca3af;
}

/* Action buttons row */
.batch-expanded-view__student-actions {
  display: flex;
  gap: 6px;
  padding: 8px 14px 10px;
  border-top: 1px solid #f3f4f6;
  flex-wrap: wrap;
}

.batch-expanded-view__confirm-btn {
  background: linear-gradient(135deg, #337fa3, #285a76) !important;
  border-color: transparent !important;
}

.batch-expanded-view__confirm-btn {
  flex: 2;
  font-size: 12px;
  font-weight: 600;
}

.batch-expanded-view__edit-btn {
  flex: 1;
  font-size: 12px;
  border-color: #d1d5db;
  color: #374151;
}

.batch-expanded-view__skip-btn {
  flex: 1;
  font-size: 12px;
  min-width: 64px;
}

/* ── Empty state (0 suggestions) ────────────────────────────────────────────*/

.batch-action-card--empty {
  border-radius: 8px;
  padding: 16px 14px;
  justify-content: center;
  align-items: center;
  min-height: 60px;
}

.batch-action-card__empty-msg {
  font-size: 12.5px;
  color: #6b7280;
  margin: 0;
  text-align: center;
}

/* ── Executing spinner overlay ───────────────────────────────────────────────*/

.batch-action-card__executing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(51, 127, 163, 0.04);
}

.batch-action-card__executing-label {
  font-size: 12px;
  color: #337fa3;
}

/* ── Responsive ──────────────────────────────────────────────────────────────*/

@media (max-width: 420px) {
  .batch-action-card,
  .batch-result-summary,
  .batch-expanded-view {
    max-width: 100%;
    border-radius: 8px;
  }

  .batch-action-card__footer {
    flex-direction: column;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────────────────*/

@media (prefers-reduced-motion: reduce) {
  .batch-proactive__show-btn,
  .batch-proactive__dismiss-btn,
  .batch-result-summary__retry-btn,
  .batch-sub-card,
  .batch-action-card {
    transition: none;
  }
}

/* ELMS-1272 — AI Tutor Trigger button styles.
   Global CSS (no modules) — workspace rule.
   Extends the visual language of dashboard.css. */

/* ── Floating container ─────────────────────────────────────────────────────
   AC1: fixed position, bottom-right, z-index 900.
   AC5: 60×60px circular, 3px white border.
   AC6: gradient 135deg #337FA3 → #285A76.
   AC7: icon centred, white.
   AC8: box-shadow.
   AC11: hover scale + darker shadow, 200ms ease-out.
   AC12: active scale(0.98).
   AC15: aria-label is in JSX.
   AC17: focus ring 2px #2563EB, offset 4px.
   ─────────────────────────────────────────────────────────────────────────── */

.ai-tutor-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;

  /* Size + shape (AC5) */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #ffffff;

  /* Gradient (AC6) */
  background: linear-gradient(135deg, #337fa3, #285a76);

  /* Shadow (AC8) */
  box-shadow: 0 8px 24px rgba(51, 127, 163, 0.35);

  /* Centre icon */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Reset browser button defaults */
  padding: 0;
  cursor: pointer;

  /* GPU-accelerated transitions (AC11) */
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, opacity 200ms ease-out;

  /* Stacking context for badge + pulse */
  overflow: visible;
}

/* AC17 — visible focus ring */
.ai-tutor-trigger.focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
}
.ai-tutor-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
}

/* AC11 — hover */
.ai-tutor-trigger:hover:not(:disabled):not([aria-disabled='true']) {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(51, 127, 163, 0.55);
}

/* AC12 — active/pressed */
.ai-tutor-trigger:active:not([aria-disabled='true']) {
  transform: scale(0.98);
}

/* AC24 — degraded state */
.ai-tutor-trigger--degraded {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Pulse ring (AC9) ────────────────────────────────────────────────────────
   Absolute ring that expands (scale 1 → 1.6) and fades out over 2s infinite.
   Uses transform instead of width/height for GPU acceleration.
   ─────────────────────────────────────────────────────────────────────────── */

.ai-tutor-trigger__pulse {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  border: 2px solid rgba(51, 127, 163, 0.7);
  /* Start at the same size as the button; animation expands it. */
  animation: ai-tutor-pulse-ring 2s ease-out infinite;
  pointer-events: none;
}

@keyframes ai-tutor-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* AC10 — disable pulse after 3 opens (class added by hook) */
.ai-tutor-trigger.no-pulse .ai-tutor-trigger__pulse {
  animation: none;
  display: none;
}

/* AC18 — respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ai-tutor-trigger__pulse {
    animation: none;
    display: none;
  }
  .ai-tutor-trigger {
    transition: none;
  }
}

/* ── Badge (AC13) ────────────────────────────────────────────────────────────
   Small "AI" label top-right of the button.
   ELMS-1278: font JetBrains Mono 10px, white background.
   ─────────────────────────────────────────────────────────────────────────── */

.ai-tutor-trigger__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ffffff;
  color: #285a76;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  /* Ensure badge sits above the pulse ring */
  z-index: 1;
}

/* ── Tooltip wrapper ─────────────────────────────────────────────────────────
   Inline-block so the Tooltip's trigger has correct dimensions.
   ─────────────────────────────────────────────────────────────────────────── */

.ai-tutor-trigger__tooltip-wrapper {
  display: inline-block;
  /* The button inside is fixed-position, so this wrapper is invisible to
     layout — it exists only to satisfy AntD Tooltip's child ref requirement. */
}

/* ELMS-1270 / ELMS-1304 — Conversation History sub-feature styles.
   Extends ai-tutor-panel.css visual language.
   Global CSS (no modules — workspace rule). */

/* ── Loading skeleton (ConversationLoadingState) ────────────────────────────── */

.conv-history-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 12px;
  flex: 1;
}

.conv-history-loading__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conv-history-loading__bar {
  border-radius: 6px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 400% 100%;
  animation: conv-history-shimmer 1.4s ease infinite;
}

.conv-history-loading__bar--short {
  height: 12px;
  width: 55%;
}

.conv-history-loading__bar--long {
  height: 36px;
  width: 80%;
}

.conv-history-loading__bar--user {
  height: 30px;
  width: 60%;
  align-self: flex-end;
}

@keyframes conv-history-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── Empty state (ConversationEmptyState) ────────────────────────────────────── */

.conv-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px 20px;
  text-align: center;
  color: #6b7280;
}

.conv-history-empty__icon {
  font-size: 40px;
  color: #d1d5db;
  margin-bottom: 12px;
}

.conv-history-empty__title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 6px;
}

.conv-history-empty__sub {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

/* ── Panel header delete trigger ─────────────────────────────────────────────── */

.conv-history-delete-trigger {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
  padding: 0;
  margin-right: 4px;
}

.conv-history-delete-trigger:hover {
  background: rgba(239, 68, 68, 0.35);
}

.conv-history-delete-trigger.focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.conv-history-delete-trigger:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

/* ── V3.3 History Drawer ─────────────────────────────────────────────────────── */

.conv-history-drawer__empty {
  padding: 32px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

/* ── V3.3 Conversation list item ─────────────────────────────────────────────── */

.conv-history-list-item {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 120ms ease;
}

.conv-history-list-item:hover {
  background: #f9fafb;
}

.conv-history-list-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.conv-history-list-item__class {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.conv-history-list-item__date {
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}

.conv-history-list-item__meta {
  font-size: 11.5px;
  color: #6b7280;
  margin-bottom: 3px;
}

.conv-history-list-item__summary {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .conv-history-loading__bar {
    animation: none;
    background: #e5e7eb;
  }
}

/* ELMS-1267 — Action Card styles.
   Extends ai-tutor-panel.css visual language. Global CSS (no modules — workspace rule).
   Responsive within 420px panel width. */

/* ── Card container ────────────────────────────────────────────────────────── */

.action-card {
  background: #ffffff;
  border: 1.5px solid #e0f0f8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(51, 127, 163, 0.12);
  width: 100%;
  max-width: 380px;
  font-size: 13px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.action-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 8px;
  background: linear-gradient(135deg, rgba(51, 127, 163, 0.08), rgba(40, 90, 118, 0.06));
  border-bottom: 1px solid #e0f0f8;
}

.action-card__header-label {
  font-size: 11px;
  font-weight: 700;
  color: #285a76;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Preview section ───────────────────────────────────────────────────────── */

.action-card__preview {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-card__preview-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.action-card__preview-row--student {
  margin-bottom: 2px;
}

.action-card__preview-row--codes {
  align-items: flex-start;
}

.action-card__preview-row--content {
  align-items: flex-start;
  gap: 10px;
}

.action-card__preview-row--meta {
  margin-top: 4px;
}

.action-card__preview-icon {
  color: #337fa3;
  font-size: 12px;
  flex-shrink: 0;
}

.action-card__preview-label {
  font-size: 12px;
  color: #6b7280;
  flex-shrink: 0;
}

.action-card__preview-value {
  font-size: 12.5px;
  font-weight: 500;
  color: #111827;
}

/* Student avatar + name */
.action-card__student-avatar {
  flex-shrink: 0;
}

.action-card__student-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
}

/* Objective code — monospace (AC3) */
.action-card__objective-code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11.5px;
  background: rgba(51, 127, 163, 0.07);
  border: 1px solid rgba(51, 127, 163, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  color: #285a76;
  word-break: break-all;
}

/* Content thumbnail */
.action-card__content-thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.action-card__content-info {
  flex: 1;
  min-width: 0;
}

.action-card__content-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  display: block;
  line-height: 1.4;
}

/* ── Footer buttons (AC4) ──────────────────────────────────────────────────── */

.action-card__footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid #f3f4f6;
}

.action-card__confirm-btn {
  background: linear-gradient(135deg, #337fa3, #285a76) !important;
  border-color: transparent !important;
}

.action-card__confirm-btn {
  flex: 1;
  font-weight: 600;
  font-size: 12.5px;
}

.action-card__confirm-btn:not(:disabled):hover {
  opacity: 0.9;
}

.action-card__edit-btn {
  font-size: 12.5px;
  border-color: #d1d5db;
  color: #374151;
}

/* ── Executing spinner ─────────────────────────────────────────────────────── */

.action-card__executing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(51, 127, 163, 0.04);
}

.action-card__executing-label {
  font-size: 12px;
  color: #337fa3;
}

/* ── Success state (AC6) ───────────────────────────────────────────────────── */

.action-card__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 14px;
  background: #f0fdf4;
  text-align: center;
}

.action-card__success-icon {
  font-size: 32px;
  color: #16a34a;
  margin-bottom: 4px;
}

.action-card__success-msg {
  font-size: 13.5px;
  font-weight: 600;
  color: #15803d;
  margin: 0;
}

.action-card__success-meta,
.action-card__success-trace {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
}

.action-card__success-trace code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
}

/* ── Error state (AC14) ────────────────────────────────────────────────────── */

.action-card__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: #fef2f2;
  text-align: center;
}

.action-card__error-icon {
  font-size: 24px;
  color: #dc2626;
}

.action-card__error-msg {
  font-size: 12.5px;
  color: #991b1b;
  margin: 0;
}

.action-card__error-retry {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 4px 14px;
  cursor: pointer;
  transition: background 150ms ease;
}

.action-card__error-retry:hover {
  background: #fee2e2;
}

.action-card__error-retry.focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.action-card__error-retry:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.action-card__error-exhausted {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
}

/* ── Duplicate prompt (AC10) ───────────────────────────────────────────────── */

.action-card__duplicate {
  padding: 12px 14px;
  background: #fffbeb;
  border-top: 1px solid #fde68a;
}

.action-card__duplicate-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.action-card__duplicate-icon {
  color: #d97706;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.action-card__duplicate-msg {
  font-size: 12.5px;
  color: #92400e;
  margin: 0;
  line-height: 1.45;
}

.action-card__duplicate-actions {
  display: flex;
  gap: 8px;
}

.action-card__duplicate-btn {
  flex: 1;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 150ms ease;
}

.action-card__duplicate-btn--primary {
  background: #337fa3;
  color: #fff;
}

.action-card__duplicate-btn--primary:hover {
  background: #285a76;
}

.action-card__duplicate-btn--secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.action-card__duplicate-btn--secondary:hover {
  background: #f3f4f6;
}

.action-card__duplicate-btn.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.action-card__duplicate-btn:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

/* ── Edit form ─────────────────────────────────────────────────────────────── */

.action-card__edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-card__edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-card__edit-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
}

/* ── Compact variant — tighter padding for batch expanded view (ELMS-1294) ── */

.action-card--compact {
  font-size: 12px;
  box-shadow: 0 1px 6px rgba(51, 127, 163, 0.08);
}

.action-card--compact .action-card__header {
  padding: 7px 10px 6px;
}

.action-card--compact .action-card__preview {
  padding: 8px 10px;
  gap: 6px;
}

.action-card--compact .action-card__student-name {
  font-size: 12.5px;
}

.action-card--compact .action-card__footer {
  padding: 7px 10px 9px;
}

.action-card--compact .action-card__confirm-btn,
.action-card--compact .action-card__edit-btn {
  font-size: 12px;
}

/* ── Responsive — keep within 420px panel ─────────────────────────────────── */

@media (max-width: 420px) {
  .action-card {
    max-width: 100%;
    border-radius: 8px;
  }

  .action-card__footer {
    flex-direction: column;
  }
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .action-card__confirm-btn,
  .action-card__edit-btn,
  .action-card__error-retry,
  .action-card__duplicate-btn {
    transition: none;
  }
}

/* ELMS-1273 — AI Tutor Chat Panel styles.
   Extends dashboard.css visual language. Global CSS (no modules — workspace rule).
   Gradient + brand colours reuse the same tokens as ai-tutor-trigger.css. */

/* ── Panel container (AC1, AC2) ─────────────────────────────────────────────── */

.ai-tutor-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 950;

  width: 420px;
  height: 640px;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(51, 127, 163, 0.25), 0 4px 16px rgba(0, 0, 0, 0.08);

  overflow: hidden;

  /* AC2: slide-in animation */
  transform-origin: bottom right;
  animation: ai-panel-slide-in 280ms cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes ai-panel-slide-in {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* AC1: mobile full-screen */
@media (max-width: 640px) {
  .ai-tutor-panel {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    transform-origin: center bottom;
  }

  .ai-tutor-panel-backdrop {
    display: block;
  }
}

/* Mobile backdrop */
.ai-tutor-panel-backdrop {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 949;
  animation: ai-panel-backdrop-in 200ms ease both;
}

@keyframes ai-panel-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Header (AC5, AC6, AC7, AC8) ────────────────────────────────────────────── */

.ai-tutor-panel__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #337fa3, #285a76);
}

.ai-tutor-panel__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.ai-tutor-panel__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

/* Online dot with pulse (AC6) */
.ai-tutor-panel__online-dot {
  position: absolute;
  bottom: 0;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #285a76;
  animation: ai-panel-online-pulse 2s ease-in-out infinite;
}

@keyframes ai-panel-online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50%       { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.ai-tutor-panel__header-text {
  flex: 1;
  min-width: 0;
}

.ai-tutor-panel__title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.ai-tutor-panel__subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-tutor-panel__close {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
  padding: 0;
}

.ai-tutor-panel__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ai-tutor-panel__close.focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ai-tutor-panel__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Context banner (AC9, AC10, AC11) ───────────────────────────────────────── */

.ai-tutor-panel__context-banner {
  /* Containing block for the hidden switcher <Select> overlay (ContextBanner.tsx).
     Without this, the Select's position:absolute escapes to .ai-tutor-panel (the
     nearest positioned ancestor via position:fixed) and blanket-covers the whole
     panel — eating clicks on the input, messages and header. */
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 16px;
  background: rgba(51, 127, 163, 0.08);
  border-bottom: 1px solid rgba(51, 127, 163, 0.12);
  cursor: pointer;
  transition: background 150ms ease;
  min-height: 38px;
}

/* ELMS-1368: "Currently on: <page>" label — sits above the class row when non-null. */
.ai-tutor-panel__context-page-label {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #337fa3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 2px;
}

.ai-tutor-panel__context-banner:hover {
  background: rgba(51, 127, 163, 0.14);
}

.ai-tutor-panel__context-icon {
  flex-shrink: 0;
  color: #337fa3;
  font-size: 14px;
}

.ai-tutor-panel__context-text {
  flex: 1;
  font-size: 12px;
  color: #285a76;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-tutor-panel__context-chevron {
  flex-shrink: 0;
  color: #337fa3;
  font-size: 12px;
}

/* Class dropdown inside banner */
.ai-tutor-panel__class-dropdown {
  width: 100%;
}

.ai-tutor-panel__class-dropdown .ant-select-selector {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.ai-tutor-panel__class-dropdown .ant-select-selector {
  font-size: 12px;
  color: #285a76;
  font-weight: 500;
}

/* ── Message list (AC15-AC20) ───────────────────────────────────────────────── */

.ai-tutor-panel__message-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* smooth scroll for auto-scroll */
  scroll-behavior: smooth;
}

.ai-tutor-panel__message-list:focus {
  outline: none;
}

/* ── Message bubbles (AC15-AC18) ────────────────────────────────────────────── */

.ai-tutor-panel__bubble-row {
  display: flex;
  flex-direction: column;
}

.ai-tutor-panel__bubble-row--user {
  align-items: flex-end;
}

.ai-tutor-panel__bubble-row--assistant {
  align-items: flex-start;
}

.ai-tutor-panel__bubble {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
  position: relative;
}

.ai-tutor-panel__bubble--user {
  background: linear-gradient(135deg, #337fa3, #285a76);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-tutor-panel__bubble--assistant {
  background: #f3f4f6;
  color: #111827;
  border-bottom-left-radius: 4px;
}

.ai-tutor-panel__bubble--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* Bubble meta row: holds timestamp + copy button, hidden on idle (AC18 / DoD #3) */
.ai-tutor-panel__bubble-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.ai-tutor-panel__bubble-row:hover .ai-tutor-panel__bubble-meta {
  opacity: 1;
}

.ai-tutor-panel__bubble-row--user .ai-tutor-panel__bubble-meta {
  justify-content: flex-end;
}

.ai-tutor-panel__bubble-row--assistant .ai-tutor-panel__bubble-meta {
  justify-content: flex-start;
}

/* Timestamp: hidden by default, shown on hover (AC18) */
.ai-tutor-panel__bubble-time {
  font-size: 10px;
  color: #9ca3af;
}

/* Copy button (DoD #3) */
.ai-tutor-panel__bubble-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 11px;
  line-height: 1;
  transition: color 120ms ease;
}

.ai-tutor-panel__bubble-copy:hover {
  color: #4b5563;
}

.ai-tutor-panel__bubble-copy.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
  border-radius: 2px;
}

.ai-tutor-panel__bubble-copy:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Markdown inside AI bubbles (AC19) */
.ai-tutor-panel__bubble--assistant p { margin: 0 0 6px; }
.ai-tutor-panel__bubble--assistant p:last-child { margin-bottom: 0; }
.ai-tutor-panel__bubble--assistant ul,
.ai-tutor-panel__bubble--assistant ol { padding-left: 18px; margin: 6px 0; }
.ai-tutor-panel__bubble--assistant li { margin-bottom: 3px; }
.ai-tutor-panel__bubble--assistant code {
  background: rgba(0,0,0,0.07);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
}
.ai-tutor-panel__bubble--assistant pre {
  background: rgba(0,0,0,0.07);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 8px 0;
}
.ai-tutor-panel__bubble--assistant pre code {
  background: none;
  padding: 0;
}

/* Error retry button */
.ai-tutor-panel__error-retry {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 150ms ease;
}

.ai-tutor-panel__error-retry:hover {
  background: #fee2e2;
}

.ai-tutor-panel__error-retry.focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.ai-tutor-panel__error-retry:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

/* ── Typing indicator (AC21) ────────────────────────────────────────────────── */

.ai-tutor-panel__typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 13px;
  background: #f3f4f6;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: -moz-fit-content;
  width: fit-content;
}

.ai-tutor-panel__typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
  animation: ai-panel-typing-dot 1.4s ease-in-out infinite;
}

.ai-tutor-panel__typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-tutor-panel__typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-panel-typing-dot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ── Welcome state (AC12-AC14) ──────────────────────────────────────────────── */

.ai-tutor-panel__welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px 20px;
  text-align: center;
}

.ai-tutor-panel__welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #337fa3, #285a76);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(51, 127, 163, 0.3);
}

.ai-tutor-panel__welcome-greeting {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.4;
}

.ai-tutor-panel__welcome-sub {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 20px;
}

.ai-tutor-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* ── Suggestion chip (AC13) ─────────────────────────────────────────────────── */

.ai-tutor-panel__chip {
  padding: 7px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 9999px;
  font-size: 12.5px;
  color: #0369a1;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease, box-shadow 150ms ease;
}

.ai-tutor-panel__chip:hover {
  background: #e0f2fe;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.15);
}

.ai-tutor-panel__chip:active {
  transform: scale(0.98);
}

.ai-tutor-panel__chip.focus-visible {
  outline: 2px solid #0369a1;
  outline-offset: 2px;
}

.ai-tutor-panel__chip:focus-visible {
  outline: 2px solid #0369a1;
  outline-offset: 2px;
}

/* ── Explain follow-up chip row (ELMS-1137) ─────────────────────────────────── */

.ai-tutor-panel__explain-followup-row {
  flex-shrink: 0;
  padding: 4px 12px 8px;
  display: flex;
  justify-content: flex-start;
}

/* ── Input area (AC23-AC25) ─────────────────────────────────────────────────── */

.ai-tutor-panel__input-area {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #f3f4f6;
  background: #fff;
}

.ai-tutor-panel__textarea {
  flex: 1;
  resize: none;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #111827;
  background: #f9fafb;
  min-height: 38px;
  max-height: 96px; /* 4 lines × 24px */
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
  font-family: inherit;
}

.ai-tutor-panel__textarea:focus {
  border-color: #337fa3;
  background: #fff;
}

.ai-tutor-panel__textarea::placeholder {
  color: #9ca3af;
}

.ai-tutor-panel__textarea:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.ai-tutor-panel__send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #337fa3, #285a76);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 150ms ease, transform 100ms ease;
  padding: 0;
}

.ai-tutor-panel__send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ai-tutor-panel__send:not(:disabled):hover {
  opacity: 0.9;
}

.ai-tutor-panel__send:not(:disabled):active {
  transform: scale(0.96);
}

.ai-tutor-panel__send.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.ai-tutor-panel__send:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

/* ── Banners (AC34-AC36) ────────────────────────────────────────────────────── */

.ai-tutor-panel__banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
}

.ai-tutor-panel__banner--rate-limit {
  background: #fef3c7;
  border-top: 1px solid #fcd34d;
  color: #92400e;
}

.ai-tutor-panel__banner--503 {
  background: #fef2f2;
  border-top: 1px solid #fca5a5;
  color: #991b1b;
}

.ai-tutor-panel__banner--offline {
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  color: #374151;
}

/* ── Access-denied / error banner (AC12 / ELMS-1300) ───────────────────────── */

.ai-tutor-panel__error-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
}

.ai-tutor-panel__error-banner--error {
  background: #fef2f2;
  border-top: 1px solid #fca5a5;
  color: #991b1b;
}

/* ── Inline class-picker overlay (ELMS-1297 Fix #4) ────────────────────────── */
/* Sits inside the panel's flex column, above the message list / welcome state. */

.ai-tutor-panel__class-picker-overlay {
  flex-shrink: 0;
  padding: 16px;
  background: #f0f9ff;
  border-bottom: 1px solid #bae6fd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-tutor-panel__class-picker-prompt {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0369a1;
}

.ai-tutor-panel__class-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-tutor-panel__class-picker-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease;
}

.ai-tutor-panel__class-picker-item:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.ai-tutor-panel__class-picker-item.focus-visible {
  outline: 2px solid #0369a1;
  outline-offset: 2px;
}

.ai-tutor-panel__class-picker-item:focus-visible {
  outline: 2px solid #0369a1;
  outline-offset: 2px;
}

.ai-tutor-panel__class-picker-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #0c4a6e;
}

.ai-tutor-panel__class-picker-item-lesson {
  font-size: 11px;
  color: #0369a1;
  font-weight: 400;
}

/* ── Streaming cursor (AC31 / ELMS-1134) ────────────────────────────────────── */

.ai-tutor-panel__stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #337fa3;
  border-radius: 1px;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: ai-panel-cursor-blink 0.8s step-end infinite;
}

@keyframes ai-panel-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Tab strip (ELMS-1134) ──────────────────────────────────────────────────── */

.ai-tutor-panel__tabs {
  flex-shrink: 0;
}

/* Override AntD Tabs to fit the panel's compact style */
.ai-tutor-panel__tabs .ant-tabs-nav {
  margin: 0;
  padding: 0 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.ai-tutor-panel__tabs .ant-tabs-nav::before {
  border-bottom: none;
}

.ai-tutor-panel__tabs .ant-tabs-tab {
  padding: 8px 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
}

.ai-tutor-panel__tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #337fa3;
  font-weight: 600;
}

.ai-tutor-panel__tabs .ant-tabs-ink-bar {
  background: #337fa3;
}

.ai-tutor-panel__tabs .ant-tabs-content-holder {
  /* Tab content fills remaining panel height */
  flex: 1;
  overflow: hidden;
}

.ai-tutor-panel__tabs .ant-tabs-content {
  height: 100%;
}

.ai-tutor-panel__tabs .ant-tabs-tabpane {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Chat tab: normal flex col (MessageList takes flex:1) */
.ai-tutor-panel__tab-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Placeholder tabs: centered content card */
.ai-tutor-panel__tab-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
  gap: 8px;
  color: #6b7280;
}

.ai-tutor-panel__tab-placeholder-icon {
  font-size: 32px;
  color: #d1d5db;
  margin-bottom: 8px;
}

.ai-tutor-panel__tab-placeholder-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.ai-tutor-panel__tab-placeholder-sub {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

/* ── Feedback buttons (ELMS-1134) ───────────────────────────────────────────── */

.ai-tutor-panel__feedback {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding-left: 2px;
}

.ai-tutor-panel__feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.ai-tutor-panel__feedback-btn:hover {
  color: #337fa3;
  background: rgba(51, 127, 163, 0.08);
  border-color: rgba(51, 127, 163, 0.2);
}

.ai-tutor-panel__feedback-btn.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.ai-tutor-panel__feedback-btn:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.ai-tutor-panel__feedback-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-tutor-panel__feedback-btn--active {
  color: #059669;
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
}

.ai-tutor-panel__feedback-btn--active-negative {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}

.ai-tutor-panel__feedback-recorded {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #059669;
  font-weight: 500;
}

/* ── Daily limit badge (ELMS-1134) ──────────────────────────────────────────── */

.ai-tutor-panel__daily-limit-badge {
  flex-shrink: 0;
  align-self: flex-end;
  margin: 0 12px 0 0;
  padding: 3px 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: #0369a1;
  white-space: nowrap;
}

/* ── Input affordance buttons (image-attach + mic, ELMS-1134) ───────────────── */

.ai-tutor-panel__input-actions {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.ai-tutor-panel__input-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 14px;
  padding: 0;
  transition: color 120ms ease, background 120ms ease;
}

.ai-tutor-panel__input-action-btn:hover:not(:disabled) {
  color: #337fa3;
  background: rgba(51, 127, 163, 0.08);
}

.ai-tutor-panel__input-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ai-tutor-panel__input-action-btn.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

.ai-tutor-panel__input-action-btn:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: 2px;
}

/* ── Reduced-motion overrides ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ai-tutor-panel {
    animation: none;
  }
  .ai-tutor-panel-backdrop {
    animation: none;
  }
  .ai-tutor-panel__online-dot {
    animation: none;
  }
  .ai-tutor-panel__typing-dot {
    animation: none;
    opacity: 0.7;
  }
  .ai-tutor-panel__chip,
  .ai-tutor-panel__close,
  .ai-tutor-panel__send {
    transition: none;
  }
  .ai-tutor-panel__stream-cursor {
    animation: none;
    opacity: 1;
  }
}

/* ELMS-1137 — "Hỏi AI giải thích" button styles.
   Global CSS (no modules) — workspace rule.
   ai-purple token: #8B5CF6 (indigo-violet, same saturation family as AI teal brand).
   Defined as a CSS var so downstream overrides remain isolated. */

:root {
  --ai-purple: #8b5cf6;
  --ai-purple-dark: #6d28d9;
  --ai-purple-light: #ede9fe;
  --ai-purple-border: #c4b5fd;
}

/* ── Explain button ─────────────────────────────────────────────────────────── */

.ai-explain-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--ai-purple-light);
  border: 1px solid var(--ai-purple-border);
  border-radius: 9999px;
  color: var(--ai-purple-dark);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, transform 100ms ease;
  white-space: nowrap;
}

.ai-explain-button:hover {
  background: #ddd6fe;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.2);
}

.ai-explain-button:active {
  transform: scale(0.97);
}

.ai-explain-button.focus-visible {
  outline: 2px solid var(--ai-purple);
  outline-offset: 2px;
}

.ai-explain-button:focus-visible {
  outline: 2px solid var(--ai-purple);
  outline-offset: 2px;
}

/* ── Question highlight ring (ELMS-1137 scroll + highlight) ─────────────────── */
/* Applied programmatically for ~3s after explain is triggered */

.ai-explain-question-highlight {
  /* Override the red/green result border with a purple ring that layers on top */
  box-shadow: 0 0 0 3px var(--ai-purple);
  transition: box-shadow 300ms ease;
}

/* ── Follow-up "Cho ví dụ khác" chip in AI panel ────────────────────────────── */

.ai-explain-followup-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--ai-purple-light);
  border: 1px solid var(--ai-purple-border);
  border-radius: 9999px;
  color: var(--ai-purple-dark);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, transform 100ms ease;
  margin-top: 8px;
}

.ai-explain-followup-chip:hover {
  background: #ddd6fe;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.2);
}

.ai-explain-followup-chip:active {
  transform: scale(0.97);
}

.ai-explain-followup-chip.focus-visible {
  outline: 2px solid var(--ai-purple);
  outline-offset: 2px;
}

.ai-explain-followup-chip:focus-visible {
  outline: 2px solid var(--ai-purple);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ai-explain-button,
  .ai-explain-followup-chip {
    transition: none;
  }
}

.react-calendar__month-view__weekdays__weekday {
  font-size: 12px !important;
  text-transform: capitalize !important;
}
.react-calendar__navigation__next2-button, .react-calendar__navigation__prev2-button {
  display: none !important;
}
.react-calendar__tile--now {
  background-color: #007FA3 !important;
}
.react-calendar__navigation__label__labelText {
  font-size: 14px !important;
}
.react-calendar__month-view__days__day {
  padding: 6px 4px !important;
  font-size: 12px !important;
}
.react-calendar__month-view__weekdays__weekday abbr {
  text-decoration: none !important;
} 
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}
.gradient-overlay {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2rem !important;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6), transparent) !important;
  pointer-events: none !important;
}
.topbar-local-clock{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 10px;font-size:13px;font-variant-numeric:tabular-nums;color:#1f2937;user-select:none;cursor:default;white-space:nowrap}.topbar-local-clock__time{font-weight:600}.topbar-local-clock__sep{opacity:.5}.topbar-local-clock__zone{color:#4b5563}@media(max-width: 768px){.topbar-local-clock__zone,.topbar-local-clock__sep{display:none}}
/* ELMS-1140 — Recommendation Tab styles.
   Extends ai-tutor-panel.css visual language.
   Global CSS (no modules — workspace rule). */

/* ── Tab strip ───────────────────────────────────────────────────────────────
   Sits below the ContextBanner and above the chat content area when tabs
   are present.  The strip is only rendered when the panel has extra tabs.    */

.ai-tutor-panel__tab-strip {
  flex-shrink: 0;
  display: flex;
  border-bottom: 1px solid rgba(51, 127, 163, 0.15);
  background: #ffffff;
}

.ai-tutor-panel__tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
  line-height: 1.3;
}

.ai-tutor-panel__tab-btn:hover {
  color: #337fa3;
}

.ai-tutor-panel__tab-btn--active {
  color: #285a76;
  border-bottom-color: #337fa3;
  font-weight: 700;
}

.ai-tutor-panel__tab-btn.focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: -2px;
}

.ai-tutor-panel__tab-btn:focus-visible {
  outline: 2px solid #337fa3;
  outline-offset: -2px;
}

/* ── Recommendation tab wrapper ─────────────────────────────────────────────── */

.recommendation-tab {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Skeleton loading state (3 placeholder cards) ────────────────────────────── */

.recommendation-tab__skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recommendation-tab__skeleton-card {
  border-radius: 10px;
  background: #f3f4f6;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: rec-skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes rec-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .recommendation-tab__skeleton-card {
    animation: none;
  }
}

.recommendation-tab__skeleton-line {
  border-radius: 4px;
  background: #d1d5db;
}

.recommendation-tab__skeleton-line--title {
  height: 14px;
  width: 70%;
}

.recommendation-tab__skeleton-line--sub {
  height: 11px;
  width: 50%;
}

.recommendation-tab__skeleton-line--body {
  height: 11px;
  width: 90%;
}

/* ── Empty state ──────────────────────────────────────────────────────────────── */

.recommendation-tab__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
}

.recommendation-tab__empty-icon {
  font-size: 32px;
  color: #d1d5db;
}

.recommendation-tab__empty-text {
  font-size: 13.5px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* ── Forecast banner ──────────────────────────────────────────────────────────── */

.recommendation-tab__forecast {
  font-size: 12px;
  color: #285a76;
  background: rgba(51, 127, 163, 0.07);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 2px;
  line-height: 1.45;
}

/* ── DrillRecommendCard ───────────────────────────────────────────────────────── */

.drill-recommend-card {
  border: 1px solid rgba(51, 127, 163, 0.15);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  overflow: hidden;

  /* Slide-out animation — triggered by the --dismissed modifier class */
  transition: max-height 300ms ease, opacity 300ms ease, margin 300ms ease,
    padding 300ms ease;
  max-height: 300px;
}

.drill-recommend-card--dismissed {
  animation: rec-card-slide-out 300ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes rec-card-slide-out {
  0%   { opacity: 1; max-height: 300px; transform: translateX(0); }
  60%  { opacity: 0; max-height: 300px; transform: translateX(40px); }
  100% { opacity: 0; max-height: 0;     transform: translateX(40px);
         padding-top: 0; padding-bottom: 0; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .drill-recommend-card--dismissed {
    animation: none;
    display: none;
  }
}

.drill-recommend-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drill-recommend-card__skill-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(51, 127, 163, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.drill-recommend-card__title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drill-recommend-card__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.drill-recommend-card__duration {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

.drill-recommend-card__difficulty {
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

.drill-recommend-card__difficulty--easy {
  color: #059669;
  background: #d1fae5;
}

.drill-recommend-card__difficulty--medium {
  color: #d97706;
  background: #fef3c7;
}

.drill-recommend-card__difficulty--hard {
  color: #dc2626;
  background: #fee2e2;
}

.drill-recommend-card__why {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.45;
  margin: 0;
}

.drill-recommend-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.drill-recommend-card__accept-btn {
  flex: 1;
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #337fa3, #285a76);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 150ms ease;
  line-height: 1.3;
}

.drill-recommend-card__accept-btn:hover {
  opacity: 0.9;
}

.drill-recommend-card__accept-btn.focus-visible {
  outline: 2px solid #285a76;
  outline-offset: 2px;
}

.drill-recommend-card__accept-btn:focus-visible {
  outline: 2px solid #285a76;
  outline-offset: 2px;
}

.drill-recommend-card__skip-btn {
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: none;
  color: #6b7280;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  line-height: 1.3;
}

.drill-recommend-card__skip-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.drill-recommend-card__skip-btn.focus-visible {
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

.drill-recommend-card__skip-btn:focus-visible {
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

.ant-drawer-body {
    padding: 0 !important;
    overflow: hidden !important;
  }
  
  /* Active menu item styles */
  li.active-menu-item, 
  li.active-menu-item a,
  div.active-menu-item {
    background-color: var(--color-primary-light, #E6F7FA);
    color: var(--color-primary, #007FA3);
    font-weight: 700;
    position: relative;
    border-radius: 8px;
  }
  .ant-select.single-select-filter {
    width: 100% !important;
    min-width: unset !important;
  }
  /* Submenu active item styles */
  /* ul.ml-8 li.active-menu-item,
  ul.ml-8 li.active-menu-item a {
    background-color: transparent;
    color: var(--color-primary, #007FA3);
    font-weight: 700;
  } */
  
  /* Remove the left accent bar for all active items */
  /* ul.ml-8 li.active-menu-item::before,
  li.active-menu-item::before,
  div.active-menu-item::before {
    display: none;
  } */
  
  /* Hover styles */
  li.active-menu-item:hover, 
  li.active-menu-item a:hover,
  div.active-menu-item:hover {
    border-radius: 8px;
  }
  
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }
  
  .no-scrollbar {
    -ms-overflow-style: none; /* IE / Edge */
    scrollbar-width: none; /* Firefox */
  }
.main-content {
    padding: 30px 30px 0 30px !important;
}

.main-content {
    background-color: #F3F6F8;
    min-height: 100vh;
    overflow: auto;
}

.w-fill-available {
    width: -webkit-fill-available;
}

.hand-raise-animation {
    animation: handRaise 1s ease-in-out;
}

@keyframes handRaise {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Active menu item styles */
li.active-menu-item, 
li.active-menu-item a,
div.active-menu-item {
    background-color: var(--color-primary-light, #E6F7FA);
    color: var(--color-primary, #007FA3);
    font-weight: 700;
    position: relative;
    border-radius: 8px;
}

/* Submenu active item styles */
ul.ml-8 li.active-menu-item,
ul.ml-8 li.active-menu-item a {
    background-color: transparent;
    color: var(--color-primary, #007FA3);
    font-weight: 700;
}

/* Remove the left accent bar for all active items */
ul.ml-8 li.active-menu-item::before,
li.active-menu-item::before,
div.active-menu-item::before {
    display: none;
}

li.active-menu-item:hover, 
li.active-menu-item a:hover,
div.active-menu-item:hover {
    border-radius: 8px;
}

/* Breadcrumb styles */
.ant-breadcrumb {
    font-size: 14px;
}

.ant-breadcrumb a {
    color: #007FA3;
    font-weight: 500;
}

.ant-breadcrumb a:hover {
    color: #005d7a;
}

.ant-breadcrumb-separator {
    margin: 0 8px;
    color: #666;
}

.ant-breadcrumb ol {
    display: flex;
    align-items: center;
}

.ant-breadcrumb .anticon {
    font-size: 12px;
}

/* Home icon specific styles */
.ant-breadcrumb a svg {
    vertical-align: middle;
    color: #007FA3;
}
