/* ==========================================================================
   MCO - MINH CHEMISTRY OLYMPIAD DESIGN SYSTEM & RESPONSIVE STYLESHEET
   Colors: Deep Red (#B30D23) - Imperial Gold (#D4AF37) - Cream/White (#FAF7F2 / #FFFFFF)
   Typography: Standard 16px base font size across all devices
   Fixed Sticky Header + Perfect Typography & Anti-Breakage Layouts
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  /* Brand Palette */
  --primary: #B30D23;
  --primary-dark: #880819;
  --primary-light: #FFF0F2;
  --primary-hover: #960A1C;
  --primary-glow: rgba(179, 13, 35, 0.15);

  --gold: #D4AF37;
  --gold-dark: #A8841B;
  --gold-light: #FCF8EA;
  --gold-accent: #E5B824;
  --gold-glow: rgba(212, 175, 55, 0.25);

  --bg-page: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-alt: #F3ECE1;
  --bg-dark: #1A0407;

  --text-main: #1C2430;
  --text-muted: #576574;
  --text-light: #8395A7;
  --text-white: #FFFFFF;

  --border-color: rgba(179, 13, 35, 0.14);
  --border-subtle: rgba(0, 0, 0, 0.08);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(179, 13, 35, 0.08);
  --shadow-lg: 0 16px 40px rgba(179, 13, 35, 0.12);
  --shadow-gold: 0 8px 25px rgba(212, 175, 55, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-main);

  --header-height: 76px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & TYPOGRAPHY STANDARDIZATION (CHỈ THỊ 1)
   Standard base font-size = 16px for body, menu, text, links <a>, inputs
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  font-size: 1rem; /* 16px */
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
  overflow-x: hidden;
  width: 100%;
  position: relative;
  padding-top: var(--header-height); /* Offset for Fixed Header */
}

/* For Dashboard layout where topbar is inside the app layout */
body:has(.dash-layout),
body.has-dashboard {
  padding-top: 0 !important;
}

/* Smooth anchor jump offset with fixed header */
section[id], div[id] {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

/* Base link and text standard 16px */
a, p, li, button, input, select, textarea, label {
  font-size: 1rem; /* 16px */
  font-family: inherit;
  box-sizing: border-box;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img, svg, picture, video {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: normal;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.35rem);
}

h4 {
  font-size: 1.1rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  word-break: normal;
  overflow-wrap: break-word;
}

p:last-child {
  margin-bottom: 0;
}

.text-sm {
  font-size: 0.875rem !important; /* 14px */
}

.text-xs {
  font-size: 0.75rem !important; /* 12px */
}

.text-lg {
  font-size: 1.125rem !important; /* 18px */
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.text-primary {
  color: var(--primary) !important;
}

.text-gold {
  color: var(--gold-dark) !important;
}

/* ==========================================================================
   COMMON LAYOUT & UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 576px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

section {
  padding: 75px 0;
  position: relative;
  width: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  section {
    padding: 50px 0;
  }
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-white {
  background-color: var(--bg-surface);
}

.section-dark {
  background-color: var(--bg-dark);
  color: #FFFFFF;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.75);
}

.section-dark h1, .section-dark h2, .section-dark h3 {
  color: #FFFFFF;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 45px auto;
}

@media (max-width: 576px) {
  .section-head {
    margin-bottom: 32px;
  }
}

.section-head.left {
  text-align: left;
  margin-left: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  border: 1px solid var(--border-color);
  max-width: 100%;
}

.eyebrow.gold {
  color: var(--gold-dark);
  background: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.3);
}

.breadcrumb {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 15px;
}

.breadcrumb a {
  color: #FFFFFF;
  opacity: 0.85;
}

.breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
}

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

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   BUTTONS & CTAs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem; /* 16px */
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
}

@media (max-width: 576px) {
  .btn {
    padding: 11px 20px;
    font-size: 0.95rem;
  }
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(179, 13, 35, 0.28);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 13, 35, 0.36);
}

.btn-gold {
  background: linear-gradient(135deg, #E5B824 0%, #D4AF37 50%, #C3991F 100%);
  color: #1A1202;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #F0C430 0%, #E0BB40 50%, #CE9F24 100%);
  color: #1A1202;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.38);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-outline-white {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  background: #FFFFFF;
  color: var(--primary);
  border-color: #FFFFFF;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9375rem; /* 15px */
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.0625rem; /* 17px */
}

/* ==========================================================================
   FIXED SITE HEADER (CỐ ĐỊNH SCROLL TRÊN DESKTOP & MOBILE)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

@media (max-width: 576px) {
  :root {
    --header-height: 70px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(179, 13, 35, 0.2);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 1rem; /* 16px standard */
  font-weight: 600;
  color: var(--text-main);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--primary);
  transition: width var(--transition-normal);
  border-radius: var(--radius-full);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Hamburger toggle button */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 120;
}

.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 4px;
  transition: all var(--transition-normal);
  display: block;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ==========================================================================
   MOBILE MENU DRAWER (CHỈ THỊ 3)
   ========================================================================== */

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 340px);
  background: var(--bg-surface);
  z-index: 1100;
  box-shadow: -8px 0 35px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-header {
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--primary-light);
}

.mobile-nav-close {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  cursor: pointer;
}

.mobile-nav-links {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 1rem; /* 16px standard */
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.mobile-nav-links a .icon {
  font-size: 1.15rem;
  width: 26px;
  text-align: center;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-nav-footer {
  margin-top: auto;
  padding: 18px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-contact {
  font-size: 0.875rem;
  color: var(--text-muted);
  word-break: normal;
  overflow-wrap: break-word;
}

.mobile-nav-contact a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

/* ==========================================================================
   PAGE HEROES & CHEMICAL BACKGROUNDS
   ========================================================================== */

.page-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(136, 8, 25, 0.95) 0%, rgba(179, 13, 35, 0.90) 100%), var(--page-hero-img, none);
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  padding: 70px 0 60px 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 50px 0 40px 0;
  }
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  color: #FFFFFF;
  margin-bottom: 14px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.0625rem;
  max-width: 720px;
}

/* Hexagon decorative overlay */
.hex-field {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(212, 175, 55, 0.2) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

/* Periodic Element Tile Badge */
.element-tile {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  font-family: var(--font-display);
  flex-shrink: 0;
}

.element-tile .num {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1;
}

.element-tile .sym {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

/* ==========================================================================
   HOMEPAGE SPECIFIC SECTIONS
   ========================================================================== */

/* Main Hero */
.home-hero {
  position: relative;
  background: linear-gradient(135deg, #1C0508 0%, #3D080F 50%, #150305 100%);
  color: #FFFFFF;
  padding: 85px 0 70px 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .home-hero {
    padding: 50px 0 40px 0;
  }
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 991px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.hero-content h1 {
  color: #FFFFFF;
  margin-bottom: 18px;
}

.hero-content h1 span.gold-text {
  color: var(--gold);
  background: linear-gradient(90deg, #FAD02C, #D4AF37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.0625rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

@media (max-width: 576px) {
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--gold);
  }
}

.hero-stat-item .num {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-display);
  white-space: nowrap;
}

.hero-stat-item .label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .hero-card-stack {
    padding: 20px 16px;
  }
}

.hero-badge-float {
  position: absolute;
  top: -14px;
  right: -10px;
  background: var(--gold);
  color: #1A1202;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  box-shadow: var(--shadow-gold);
  white-space: nowrap;
}

/* Feature & Pillars Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 22px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  border: 1px solid var(--border-color);
}

.feature-card h3 {
  margin-bottom: 10px;
}

/* Roadmaps Section */
.roadmap-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.roadmap-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 22px;
  margin-bottom: 30px;
  position: relative;
}

.roadmap-step::after {
  content: '';
  position: absolute;
  left: 39px;
  top: 60px;
  bottom: -30px;
  width: 2px;
  background: var(--border-color);
}

.roadmap-step:last-child::after {
  display: none;
}

@media (max-width: 600px) {
  .roadmap-step {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .roadmap-step::after {
    display: none;
  }
  .step-badge {
    width: 100% !important;
    height: 48px !important;
    flex-direction: row !important;
    gap: 10px !important;
  }
}

.step-badge {
  width: 80px;
  height: 80px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--shadow-md);
  z-index: 2;
  flex-shrink: 0;
}

.step-badge span {
  font-size: 0.75rem;
  color: var(--gold);
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

/* Hall of Fame / Results */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px;
}

.student-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition-normal);
  box-sizing: border-box;
}

.student-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.student-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.student-award {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gold-light);
  color: var(--gold-dark);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  max-width: 100%;
}

/* Instructors Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  box-sizing: border-box;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.team-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

/* ==========================================================================
   FAQ ACCORDION (YÊU CẦU FAQ)
   ========================================================================== */

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.faq-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-q {
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: color var(--transition-fast);
}

@media (max-width: 576px) {
  .faq-q {
    padding: 15px 16px;
    font-size: 0.95rem;
  }
}

.faq-item.open .faq-q {
  color: var(--primary);
}

.faq-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-normal);
  font-size: 0.8125rem;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  background: var(--primary);
  color: #FFFFFF;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  padding: 0 20px;
}

@media (max-width: 576px) {
  .faq-a {
    padding: 0 16px;
  }
}

.faq-a-inner {
  padding-bottom: 18px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  font-size: 0.95rem;
}

/* ==========================================================================
   COURSES & DOCUMENT GRIDS
   ========================================================================== */

/* Filter Row */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  width: 100%;
}

@media (max-width: 768px) {
  .filter-row {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-row::-webkit-scrollbar {
    display: none;
  }
}

.chip {
  padding: 9px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.chip:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(179, 13, 35, 0.25);
}

/* Course Grid */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 26px;
  width: 100%;
}

@media (max-width: 640px) {
  .course-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.course-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-sizing: border-box;
  width: 100%;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.course-top {
  height: 170px;
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.course-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
}

.course-top .element-tile {
  position: relative;
  z-index: 2;
}

.course-level-badge {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.75);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.course-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

@media (max-width: 480px) {
  .course-body {
    padding: 18px 16px;
  }
}

.course-tag {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.course-body h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.course-body p {
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.course-features-mini {
  list-style: none;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-features-mini li {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.course-level {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Documents Grid */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
  width: 100%;
}

@media (max-width: 640px) {
  .doc-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: all var(--transition-normal);
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 480px) {
  .doc-card {
    padding: 18px 16px;
  }
}

.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.doc-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.doc-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* ==========================================================================
   CONSULTATION FORM (CTA SECTION)
   ========================================================================== */

.cta-section {
  background: linear-gradient(135deg, #880819 0%, #B30D23 100%);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 991px) {
  .cta-section {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 576px) {
  .cta-section {
    padding: 26px 16px;
    border-radius: var(--radius-md);
  }
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

@media (max-width: 991px) {
  .cta-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.cta-grid h2 {
  color: #FFFFFF;
  margin-bottom: 14px;
}

.cta-grid p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .contact-chip {
    width: 100%;
  }
}

.contact-chip .ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #1A1202;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-chip a {
  color: #FFFFFF;
  font-weight: 600;
  word-break: normal;
  overflow-wrap: break-word;
}

.form-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 576px) {
  .form-card {
    padding: 22px 16px;
    border-radius: var(--radius-md);
  }
}

.form-card h3 {
  color: var(--primary);
  margin-bottom: 18px;
  font-size: 1.25rem;
}

.field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #FFFFFF;
}

/* ==========================================================================
   DASHBOARD LAYOUT & SIDEBAR (CHỈ THỊ 4)
   ========================================================================== */

.dash-layout {
  display: flex;
  min-height: 100vh;
  background: #F4EFE6;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Sidebar Styling */
.dash-sidebar {
  width: 275px;
  background: #FFFFFF;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-normal), transform var(--transition-smooth);
  flex-shrink: 0;
  z-index: 95;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dash-sidebar.collapsed {
  width: 80px;
}

.dash-sidebar-header {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-sidebar.collapsed .brand-text {
  display: none;
}

.dash-user-card {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border-color);
  transition: padding var(--transition-fast);
}

.dash-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.dash-user-info {
  overflow: hidden;
  white-space: nowrap;
}

.dash-user-info .name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.95rem;
}

.dash-user-info .role {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 600;
}

.dash-sidebar.collapsed .dash-user-info {
  display: none;
}

.dash-sidebar.collapsed .dash-user-card {
  justify-content: center;
  padding: 14px 0;
}

/* Sidebar Nav */
.dash-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dash-nav a .nav-ic {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.dash-sidebar.collapsed .dash-nav a {
  justify-content: center;
  padding: 12px 0;
}

.dash-sidebar.collapsed .dash-nav a .nav-text {
  display: none;
}

.dash-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dash-nav a.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(179, 13, 35, 0.25);
}

.dash-nav a.active .nav-ic {
  color: var(--gold);
}

.dash-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Dashboard Main Content */
.dash-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  overflow-y: auto;
}

.dash-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 12px;
}

@media (max-width: 768px) {
  .dash-topbar {
    padding: 12px 16px;
  }
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dash-topbar-left h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle-btn {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.dash-content {
  padding: 28px 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .dash-content {
    padding: 18px 14px;
  }
}

/* Dashboard Stats Cards */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 18px;
  margin-bottom: 26px;
  width: 100%;
}

@media (max-width: 480px) {
  .dash-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.dash-stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}

.dash-stat-ic {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.dash-stat-info .num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.dash-stat-info .label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Progress bar */
.progress-box {
  background: var(--bg-page);
  border-radius: var(--radius-full);
  height: 9px;
  overflow: hidden;
  position: relative;
  margin: 8px 0;
  width: 100%;
}

.progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--gold));
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* Mobile Sidebar Drawer */
.dash-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1020;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.dash-sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 991px) {
  .dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(85vw, 300px);
    transform: translateX(-100%);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25);
    z-index: 1030;
  }
  .dash-sidebar.mobile-open {
    transform: translateX(0);
  }
  #desktopSidebarToggle {
    display: none !important;
  }
  #mobileSidebarToggle {
    display: inline-flex !important;
  }
}

@media (min-width: 992px) {
  #mobileSidebarToggle {
    display: none !important;
  }
  #desktopSidebarToggle {
    display: inline-flex !important;
  }
}

/* ==========================================================================
   FOOTER (FIX RỚT TEXT & HOÀN THIỆN BỐ CỤC)
   ========================================================================== */

.site-footer {
  background: var(--bg-dark);
  color: #FFFFFF;
  padding: 65px 0 30px 0;
  border-top: 2px solid var(--gold);
  width: 100%;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.1fr 1.6fr;
  gap: 36px;
  margin-bottom: 40px;
}

@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}

.footer-brand-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: #FFFFFF;
}

.site-footer h4 {
  color: var(--gold);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold);
}

/* Footer Contact List Structured */
.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.footer-ic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact-info .label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-contact-info a {
  color: #FFFFFF;
  font-weight: 600;
  word-break: normal;
  overflow-wrap: break-word;
}

.footer-contact-info a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 576px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   FLOATING CHAT WIDGET & TOAST NOTIFICATION
   ========================================================================== */

.chat-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 25px rgba(179, 13, 35, 0.4);
  cursor: pointer;
  z-index: 999;
  transition: all var(--transition-normal);
  border: 2px solid var(--gold);
}

@media (max-width: 576px) {
  .chat-fab {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
}

.chat-fab:hover {
  transform: scale(1.08) rotate(5deg);
}

.chat-panel {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: min(90vw, 360px);
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-smooth);
}

@media (max-width: 576px) {
  .chat-panel {
    right: 16px;
    bottom: 78px;
    width: calc(100vw - 32px);
  }
}

.chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-head {
  background: var(--primary);
  color: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-head img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}

.chat-head strong {
  display: block;
  font-size: 0.95rem;
}

.chat-head span {
  font-size: 0.75rem;
  opacity: 0.85;
}

.chat-close-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-body {
  height: 250px;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-page);
}

.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px 14px 14px 2px;
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 0.9375rem;
  box-shadow: var(--shadow-sm);
  word-break: normal;
  overflow-wrap: break-word;
}

.chat-foot {
  display: flex;
  padding: 10px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
}

.chat-foot input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  outline: none;
  font-size: 0.9375rem;
}

.chat-foot button {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  margin-left: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* Toast notification */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 40px);
}

.toast {
  background: #FFFFFF;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  font-size: 0.9375rem;
}

.toast.toast-success {
  border-left-color: #10B981;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
