/* ============================================================
   BilimClass Design System (bilimclass.kz)
   Official Kazakhstani Digital Education Platform Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
  /* BilimClass Colors */
  --bc-green:        #00A859;
  --bc-green-hover:  #008f4c;
  --bc-green-light:  #e6f7ef;
  --bc-green-border: #b3e7cd;
  --bc-green-text:   #047857;

  --bc-blue:         #0284c7;
  --bc-blue-hover:   #0369a1;
  --bc-blue-light:   #f0f9ff;
  --bc-blue-border:  #bae6fd;

  --bc-orange:       #ea580c;
  --bc-orange-hover: #c2410c;
  --bc-orange-light: #fff7ed;
  --bc-orange-border:#fed7aa;

  --bc-purple:       #7c3aed;
  --bc-purple-light: #f5f3ff;
  --bc-purple-border:#ddd6fe;

  --bc-red:          #dc2626;
  --bc-red-light:    #fef2f2;
  --bc-red-border:   #fecaca;

  /* Neutrals */
  --bg-body:         #f8fafc;
  --bg-surface:      #ffffff;
  --bg-sidebar:      #ffffff;
  --bg-input:        #f1f5f9;

  --text-primary:    #1e293b;
  --text-secondary:  #475569;
  --text-muted:      #94a3b8;
  --text-white:      #ffffff;

  --border:          #e2e8f0;
  --border-focus:    #00A859;
  --border-light:    #f1f5f9;

  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg:  0 10px 25px rgba(0, 0, 0, 0.07);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w:  250px;
  --header-h:   64px;
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Top Header (BilimClass Navbar) ─────────────────────────── */
.bc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.bc-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
}

.bc-logo-icon {
  width: 32px;
  height: 32px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bc-logo-text {
  letter-spacing: -0.5px;
}

.bc-logo-text span {
  color: var(--bc-green);
}

.bc-sidebar-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.bc-sidebar-toggle:hover {
  background: var(--bg-body);
  color: var(--bc-green);
}

.bc-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bc-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
}

.bc-icon-btn:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.bc-icon-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bc-green);
}

.bc-lang-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-surface);
}

.bc-lang-pill:hover {
  border-color: var(--bc-green);
  color: var(--bc-green);
}

.bc-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.bc-user-pill:hover {
  background: var(--bg-input);
}

.bc-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #8b5cf6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.bc-year-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bc-year-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bc-green);
}

/* ─── Layout ─────────────────────────────────────────────────── */
.bc-app-container {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ─── Left Sidebar ───────────────────────────────────────────── */
.bc-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 0 24px;
  transition: var(--transition);
}

.bc-nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bc-green);
  cursor: pointer;
  user-select: none;
}

.bc-nav-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bc-nav-item {
  position: relative;
}

.bc-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px 9px 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.bc-nav-link:hover {
  color: var(--bc-green);
  background: var(--bc-green-light);
}

.bc-nav-link.active {
  color: var(--bc-green);
  background: var(--bc-green-light);
  font-weight: 700;
  border-left-color: var(--bc-green);
}

.bc-nav-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.bc-nav-link.active .bc-nav-bullet {
  background: var(--bc-green);
}

.bc-nav-parent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.bc-nav-parent-item:hover {
  background: var(--bg-body);
  color: var(--bc-green);
}

.bc-nav-parent-item .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sidebar Partners at bottom */
.bc-partners-box {
  padding: 16px 18px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.bc-partners-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.bc-partner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

/* ─── Main Content Area ──────────────────────────────────────── */
.bc-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px 32px;
  max-width: 1440px;
  transition: var(--transition);
}

/* ─── Page Titles & Headers ──────────────────────────────────── */
.bc-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.bc-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--bc-green);
  display: flex;
  align-items: center;
  gap: 12px;
}

.bc-title span.sub {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.3rem;
}

/* ─── Day Selector Bar (Screenshot 2) ────────────────────────── */
.bc-day-tabs-bar {
  display: flex;
  background: var(--bc-green);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.bc-day-tab {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bc-day-tab:hover {
  background: rgba(255, 255, 255, 0.15);
}

.bc-day-tab.active {
  background: #ffffff;
  color: var(--bc-green);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bc-day-tab.nav-arrow {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-weight: 600;
}

/* Sub-day heading */
.bc-subday-heading {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.bc-subday-heading span {
  color: var(--bc-green);
}

/* ─── Schedule Table (Screenshot 2) ──────────────────────────── */
.bc-table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.bc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.bc-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.bc-table th:last-child {
  border-right: none;
}

.bc-table td {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: middle;
}

.bc-table td:last-child {
  border-right: none;
}

.bc-table tr:last-child td {
  border-bottom: none;
}

.bc-table tr:hover td {
  background: #fcfdfe;
}

/* Button "Өту" */
.btn-otu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 32px;
  border-radius: var(--radius-sm);
  border: 1px solid #7dd3fc;
  color: var(--bc-blue);
  background: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-otu:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* Homework Badge & Icon */
.bc-hw-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bc-hw-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 320px;
}

.bc-hw-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--bc-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.bc-hw-icon-btn:hover {
  background: #ffedd5;
}

/* ─── Week Grid Cards (Screenshot 1) ─────────────────────────── */
.bc-week-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .bc-week-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.bc-day-col-header {
  text-align: center;
  padding: 10px 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  margin-bottom: 12px;
}

.bc-day-col-header .date {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.bc-day-col-header.active {
  border-bottom-color: var(--bc-green);
}

.bc-day-col-header.active .date {
  color: var(--bc-green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.bc-day-col-header.active .date::before {
  content: '•';
  color: var(--bc-green);
}

.bc-lesson-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.bc-lesson-card:hover {
  border-color: var(--bc-green);
  box-shadow: var(--shadow-md);
}

.bc-lesson-card .subject {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.bc-lesson-card .grade {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.bc-lesson-card .actions-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.bc-lesson-card .status-text {
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.bc-lesson-card .status-text span {
  color: var(--bc-green);
  font-weight: 600;
}

.bc-lesson-card .detail-line {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.bc-lesson-card .time-line {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* ─── Standard BilimClass Cards ──────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--bc-green);
  color: #ffffff;
  border-color: var(--bc-green);
}

.btn-primary:hover {
  background: var(--bc-green-hover);
  border-color: var(--bc-green-hover);
  box-shadow: 0 4px 12px rgba(0, 168, 89, 0.25);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--bc-green);
  color: var(--bc-green);
}

.btn-success {
  background: var(--bc-green);
  color: #ffffff;
}

.btn-danger {
  background: var(--bc-red);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-green {
  background: var(--bc-green-light);
  color: var(--bc-green-text);
  border: 1px solid var(--bc-green-border);
}

.badge-blue {
  background: var(--bc-blue-light);
  color: var(--bc-blue);
  border: 1px solid var(--bc-blue-border);
}

.badge-purple {
  background: var(--bc-purple-light);
  color: var(--bc-purple);
  border: 1px solid var(--bc-purple-border);
}

.badge-orange, .badge-amber {
  background: var(--bc-orange-light);
  color: var(--bc-orange);
  border: 1px solid var(--bc-orange-border);
}

.badge-red {
  background: var(--bc-red-light);
  color: var(--bc-red);
  border: 1px solid var(--bc-red-border);
}

.badge-cyan {
  background: var(--bc-blue-light);
  color: var(--bc-blue);
  border: 1px solid var(--bc-blue-border);
}

.badge-secondary {
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--bc-green);
  box-shadow: 0 0 0 3px rgba(0, 168, 89, 0.15);
}

/* ─── Floating Support / Chat Button ─────────────────────────── */
.bc-floating-chat {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bc-green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 18px rgba(0, 168, 89, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: var(--transition);
  border: none;
}

.bc-floating-chat:hover {
  transform: scale(1.08);
  background: var(--bc-green-hover);
}

/* ─── Grid helpers ───────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

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

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.84rem; }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ─── Alerts & Flash Messages ────────────────────────────────── */
.flash-messages {
  margin-bottom: 20px;
}

.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: var(--bc-green-light);
  color: var(--bc-green-text);
  border: 1px solid var(--bc-green-border);
}

.alert-warning {
  background: var(--bc-orange-light);
  color: var(--bc-orange);
  border: 1px solid var(--bc-orange-border);
}

.alert-danger {
  background: var(--bc-red-light);
  color: var(--bc-red);
  border: 1px solid var(--bc-red-border);
}

.alert-info {
  background: var(--bc-blue-light);
  color: var(--bc-blue);
  border: 1px solid var(--bc-blue-border);
}

/* ─── Teacher Grid & Search (Search page) ─────────────────────── */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.teacher-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.teacher-card:hover {
  border-color: var(--bc-green);
  box-shadow: var(--shadow-md);
}

.teacher-card-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.teacher-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #8b5cf6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.teacher-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.teacher-subject {
  font-size: 0.85rem;
  color: var(--bc-green);
  font-weight: 600;
}

.teacher-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.teacher-price span {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ─── Stats Grid (Dashboard) ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bc-green-light);
  color: var(--bc-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Chat Styles ────────────────────────────────────────────── */
.chat-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
}

.chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fcfcfd;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
}

.message-outgoing {
  align-self: flex-end;
  background: var(--bc-green);
  color: #ffffff;
  border-bottom-right-radius: var(--radius-xs);
}

.message-incoming {
  align-self: flex-start;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--radius-xs);
}

.chat-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  background: #ffffff;
}

/* ─── Star Score Selector ────────────────────────────────────── */
.star-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.star-btn.active, .star-btn:hover {
  background: var(--bc-green);
  color: #ffffff;
  border-color: var(--bc-green);
}
