/* 
  =========================================
  ClassKru — Responsive Connected Platform
  =========================================
  Apple Glassmorphism • สีเขียวพาสเทล
  Desktop = Sidebar Layout
  Mobile = Bottom Nav + Swipe Attendance
*/

/* ซ่อน glyph ไอคอนจนกว่า icon font (HugeIcons) จะพร้อม — กัน flash ตัวอักษร CJK ตอนโหลดแรก
   ใช้ visibility:hidden (คงพื้นที่ layout, ไม่มี rule สีอื่นมาแข่ง cascade) */
html:not(.icons-ready) i.hgi-stroke { visibility: hidden !important; }

/* ===== Onboarding tour (coach marks) ===== */
.tour-mask { position: fixed; background: rgba(17,24,39,0.58); z-index: 12000; transition: all 0.2s ease; }
.tour-ring { position: fixed; z-index: 12001; border: 3px solid var(--primary); border-radius: 14px; box-shadow: 0 0 0 5px rgba(255,255,255,0.86), 0 0 0 10px rgba(29,158,117,0.26), 0 18px 44px rgba(0,0,0,0.24); pointer-events: none; transition: all 0.2s ease; }
.tour-bubble { position: fixed; z-index: 12002; width: 300px; max-width: calc(100vw - 24px); background: var(--bg-card); border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,0.28); padding: 16px 18px; }
@media (max-width: 768px) {
  .tour-ring { display: none !important; }
  .tour-bubble {
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* iOS Safari จะซูมหน้าอัตโนมัติเมื่อแตะ control ที่เล็กกว่า 16px
     ป้องกันเฉพาะ auto-zoom นี้ แต่ยังเปิดให้ผู้ใช้ pinch-zoom ตารางได้ตามปกติ */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}
.tour-action-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tour-action-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: var(--primary-light); color: var(--primary-deep); font-size: 0.78rem; font-weight: 800; }
.tour-action-chips i { font-size: 0.9rem; }
.tour-mini-checklist { display: grid; gap: 7px; margin-top: 10px; }
.tour-mini-checklist span { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--primary-light-border); border-radius: 12px; background: var(--primary-light); color: var(--text-main); font-size: 0.8rem; font-weight: 700; line-height: 1.45; }
.tour-mini-checklist b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.72rem; }
.tour-fab { position: fixed; bottom: 90px; right: 20px; z-index: 900; width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; border: none; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; box-shadow: 0 4px 14px rgba(0,0,0,0.2); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
@media (min-width: 769px) { .tour-fab { bottom: 24px; right: 24px; } }
.tour-fab:hover { animation: fab-bounce 0.7s ease infinite; box-shadow: 0 8px 22px rgba(29,158,117,0.4); }
.report-mascot-fab { position:fixed; right:82px; bottom:18px; z-index:900; width:60px; height:60px; padding:0; border:1px solid var(--primary-light-border); border-radius:50%; background:var(--bg-card); box-shadow:var(--shadow-md); cursor:pointer; overflow:hidden; transition:transform .18s ease, box-shadow .18s ease; }
.report-mascot-fab img { display:block; width:100%; height:100%; object-fit:cover; object-position:50% 24%; transform:scale(1.22); transform-origin:center 28%; }
.report-mascot-fab:hover { transform:translateY(-4px) scale(1.05); box-shadow:var(--shadow-lg); }
.report-mascot-fab:focus-visible { outline:3px solid var(--primary-light-border); outline-offset:3px; }
@media (max-width:768px) { .report-mascot-fab { right:78px; bottom:84px; width:54px; height:54px; } }
@keyframes fab-bounce { 0%, 100% { transform: translateY(0) scale(1.06); } 35% { transform: translateY(-7px) scale(1.06); } 65% { transform: translateY(-2px) scale(1.06); } }
.welcome-hero { width: 96px; height: auto; margin: 0 auto 4px; display: block; }

:root {
  --primary: #1d9e75;
  --primary-hover: #158860;
  /* เขียวเข้มสำหรับ "ตัวอักษรบนพื้นขาว" — คอนทราสต์พอสำหรับตัวเลขเล็ก (เช่น % บนหัวตารางคะแนน)
     ใช้แทนการใส่พื้นเขียวอ่อน ซึ่งเด่นจนแย่งสายตาจากตัวหนังสือ */
  --primary-deep: #0f6e56;
  --primary-light: #f3fbf8;
  --primary-light-border: #d5eee8;
  
  --bg-app: #f7f8f7;
  --bg-card: #ffffff;
  --bg-light: #f0f0ee;
  --text-main: #2f2f2e;
  --text-muted: #7a7a76;
  --border-color: #e6e6e2;

  /* เฉพาะจอที่ฉายให้นักเรียนดู (เครื่องมือหน้าชั้น/เกม) */
  --loud-ink: #123b31;
  --loud-surface: #e9f6ef;
  --loud-surface-2: #bfebd8;
  --loud-accent: #12b886;
  --loud-accent-sh: #0b7a5c;
  --loud-warm: #ff8a3d;
  --loud-warm-sh: #c2571a;

  --color-present: #22a565;
  --color-present-bg: #e8f4ec;
  --color-late: #e0a81a;
  --color-late-text: #a9750a;
  --color-late-bg: #fdf5e3;
  --color-absent: #e5544b;
  --color-absent-bg: #fdecea;
  --color-leave: #3b7fd4;
  --color-leave-bg: #eaf1fb;

  --tab-today-accent: #22a565;
  --tab-today-bg: #e8f4ec;
  --tab-weekly-accent: #3b7fd4;
  --tab-weekly-bg: #eaf1fb;
  --tab-term-accent: #8b5cf6;
  --tab-term-bg: #f5f3ff;
  --tab-overall-accent: #f97316;
  --tab-overall-bg: #fff7ed;

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.055), 0 2px 8px rgba(15,23,42,0.035);
  --shadow-md: 0 6px 18px rgba(15,23,42,0.08), 0 1px 3px rgba(15,23,42,0.04);
  --shadow-lg: 0 14px 36px rgba(15,23,42,0.12), 0 4px 10px rgba(15,23,42,0.06);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  /* ความโค้งของ "ปุ่ม" ทั้งแอป — คุมที่เดียว แก้ตรงนี้จุดเดียวเปลี่ยนทุกหน้า (21 จุดใน 7 ไฟล์)
     ปุ่มวงกลม 50% · การ์ด/modal · ช่องกรอก ไม่ใช้ตัวนี้ — ยังใช้ --radius-sm/md/lg ตามเดิม */
  --radius-btn: 18px;
  --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* โหมดถนอมสายตา: ลดความขาวจัดด้วยพื้นโทนอุ่น โดยคงสีสถานะให้แยกได้ชัด */
html.eye-care-mode {
  color-scheme: light;
  --bg-app: #f3eee2;
  --bg-card: #fffaf0;
  --bg-light: #eee7d8;
  --text-main: #373329;
  --text-muted: #736c5e;
  --border-color: #dfd5c3;
  --primary-light: #edf5e9;
  --primary-light-border: #ccdfca;
  --shadow-sm: 0 1px 3px rgba(79,62,35,0.06), 0 2px 8px rgba(79,62,35,0.035);
  --shadow-md: 0 6px 18px rgba(79,62,35,0.08), 0 1px 3px rgba(79,62,35,0.04);
}

html.eye-care-mode body { background-color: var(--bg-app); }

/* Dark Mode เปลี่ยนเฉพาะฉากหลังและเมนู เนื้อหา/ตาราง/สีสถานะยังใช้ชุดสีปกติ */
html.dark-mode {
  color-scheme: light;
  /* เนื้อหาและตารางยังเป็นกระดาษสีขาว จึงใช้ฉากหลังเทาอมเขียวแทนดำสนิท
     เพื่อไม่ให้เกิดช่องว่างดำขนาดใหญ่และคอนทราสต์กระโดดระหว่างส่วน */
  --bg-app: #e7ece9;
}

html.dark-mode body { background-color: var(--bg-app); }
html.dark-mode .sidebar { background-color: #17201d; border-right-color: #2d3a36; }
html.dark-mode .sidebar-brand,
html.dark-mode .sidebar-profile { border-color: #2d3a36; }
html.dark-mode .sidebar-brand .sidebar-tagline,
html.dark-mode .sidebar-menu .nav-item,
html.dark-mode .profile-role { color: #a7b5af; }
html.dark-mode .profile-name { color: #edf5f1; }
html.dark-mode .sidebar-menu .nav-item:hover,
html.dark-mode .sidebar-profile:hover { color: #edf5f1; background-color: #25322e; }
html.dark-mode .sidebar-menu .nav-item.active { color: #70e0bb; background-color: #173c32; }
html.dark-mode .sidebar-menu .nav-item.active::before { background: #42c99a; }
html.dark-mode .mobile-bottom-nav { background: rgba(23,32,29,0.94); border-top-color: #35413d; }
html.dark-mode .mobile-bottom-nav .mob-nav-btn { color: #a7b5af; }
html.dark-mode .mobile-bottom-nav .mob-nav-btn.active { color: #70e0bb; }
html.dark-mode .mobile-more-sheet { background: #1b2421; }
html.dark-mode .mobile-more-head h3 { color: #edf5f1; }
html.dark-mode .mobile-more-grip { background: #52605b; }
html.dark-mode .mobile-more-close,
html.dark-mode .mobile-more-item { color: #edf5f1; background: #25302d; border-color: #3b4944; }
html.dark-mode .mobile-more-item i { color: #70e0bb; background: #173c32; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "LINE Seed Sans TH", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Sarabun", "Outfit", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* จอง scrollbar แนวตั้งไว้เสมอ — กัน viewport กว้างไม่เท่ากันระหว่างหน้าเนื้อหายาว/สั้น
   ทำให้แถบแท็บที่จัดกลาง (margin:auto) อยู่ตำแหน่งเดียวกันเป๊ะทุกหน้า */
html { overflow-y: scroll; }
body {
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================== */
/* SIDEBAR LAYOUT (Desktop)                    */
/* ========================================== */
.sidebar {
  --sidebar-rail-width: 80px;
  --sidebar-open-width: 264px;
  width: var(--sidebar-rail-width);
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  z-index: 100;
  overflow: hidden;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0);
  transition: width 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease;
}

.sidebar:hover,
.sidebar:has(:focus-visible) {
  width: var(--sidebar-open-width);
  /* หน้าเช็กชื่อเป็น overlay ระดับ 8000 และเริ่มถัดจาก rail
     ยก sidebar เฉพาะตอนเปิด เพื่อให้ส่วนที่ขยายวางทับหน้าเช็กชื่อได้จริง */
  z-index: 8500;
  box-shadow: 12px 0 32px rgba(15, 23, 42, 0.12);
}

/* หลังเลือกเมนูด้วยเมาส์ ให้หดทันทีแม้ pointer ยังอยู่ใน sidebar */
.sidebar.is-click-collapsed {
  width: var(--sidebar-rail-width);
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 74px;
  padding: 0 4px 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-brand .sidebar-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
}
.sidebar-brand .sidebar-tagline {
  max-width: 0;
  margin-top: -3px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transform: translateY(-4px);
  transition: max-width 180ms ease, opacity 140ms ease, transform 180ms ease;
}

.sidebar:hover .sidebar-tagline,
.sidebar:has(:focus-visible) .sidebar-tagline {
  max-width: 210px;
  opacity: 1;
  transform: translateY(0);
}

.sidebar.is-click-collapsed .sidebar-tagline {
  max-width: 0;
  opacity: 0;
  transform: translateY(-4px);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-menu .nav-item {
  width: 100%;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  position: relative;
  gap: 14px;
  min-height: 46px;
  padding: 10px 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, transform 180ms ease;
}

.sidebar-menu .nav-item i { flex: 0 0 24px; width: 24px; font-size: 1.22rem; text-align: center; }
.sidebar-menu .nav-item span,
.sidebar .profile-info {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 140ms ease 20ms, transform 180ms ease 20ms;
}
.sidebar:hover .nav-item span,
.sidebar:has(:focus-visible) .nav-item span,
.sidebar:hover .profile-info,
.sidebar:has(:focus-visible) .profile-info {
  opacity: 1;
  transform: translateX(0);
}
.sidebar.is-click-collapsed .nav-item span,
.sidebar.is-click-collapsed .profile-info {
  opacity: 0;
  transform: translateX(-8px);
}
.sidebar-menu .nav-item:hover { background-color: #f5f8f6; color: var(--text-main); transform: translateX(2px); }
.sidebar-menu .nav-item.active { background-color: #e8f4ec; color: var(--primary); font-weight: 700; }
.sidebar-menu .nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 8px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}
.sidebar-profile:hover { background-color: #fafafa; }
.sidebar-profile img { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; }
.profile-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.profile-name { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.profile-role { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-brand .sidebar-tagline,
  .sidebar-menu .nav-item,
  .sidebar-menu .nav-item span,
  .sidebar .profile-info { transition: none; }
}

/* ========================================== */
/* MAIN CONTENT AREA                           */
/* ========================================== */
.main-content {
  margin-left: 80px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0; /* กัน flex item ขยายตามเนื้อหากว้าง (เช่น ตารางสอนคาบเยอะ) → ให้ card scroll แทนหน้าจอล้น */
  transition: var(--transition-normal);
}

.app-header {
  background-color: var(--bg-card);
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
}

.app-title-container h2 { font-size: 1.25rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }
.app-title-container .subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-date { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.app-content {
  padding: 24px;
  flex-grow: 1;
}

/* ========================================== */
/* GENERIC CARD / UTILITIES                    */
/* ========================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  animation: fadeIn 0.35s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-color);
}
/* การ์ดห้องเรียน: hover ขึ้นกรอบสีประจำห้อง + เงาเด้ง + ยกตัว */
.ck-class-card:hover {
  border-color: color-mix(in srgb, var(--cc, var(--primary)) 38%, var(--border-color));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
/* จุดสีหน้าชื่อวิชา: มือถือแสดง (บรรทัดชั้นเยื้อง 20px), คอมซ่อนจุดและรีเซ็ตการเยื้อง */
.ck-class-card .ck-class-sub { margin-left: 20px; }
@media (min-width: 769px) {
  .ck-class-card .ck-class-dot { display: none; }
  .ck-class-card .ck-class-sub { margin-left: 0; }
}

/* ปุ่ม export บนหัวจอการเข้าเรียน — ผูกสีกับความหมาย (แดง = PDF, เขียว = Excel)
   บนมือถือเหลือแค่ไอคอน สีจึงเป็นตัวบอกแทนคำที่ถูกซ่อน
   เขียนคู่กับ .btn (specificity 0,2,0) เพราะ .btn ประกาศทีหลังในไฟล์นี้ ถ้าใช้คลาสเดี่ยวจะโดนทับ */
/* ตัดพื้นหลัง — เหลือแต่ไอคอนสี (กรอบกลางๆ เข้าชุดหัวหน้าอื่น) ตัวอักษรสีปกติ */
.btn.ck-btn-pdf { background: transparent; color: var(--text-main); border: 1px solid var(--border-color); }
.btn.ck-btn-excel { background: transparent; color: var(--text-main); border: 1px solid var(--border-color); }
.ck-hdr-action.ck-btn-pdf i { color: #dc2626; }
.ck-hdr-action.ck-btn-excel i { color: #2e7d32; }

/* แถวปลายทางท้ายการ์ดห้อง — คะแนน/เช็คชื่อ/รายชื่อนักเรียน/การเข้าเรียน มองเห็นทุกอัน ไม่ต้องเดา */
.ck-class-actions {
  display: flex;
  border-top: 1px solid var(--border-color);
}
.ck-class-actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px;
  background: none;
  border: none;
  border-left: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ck-class-actions button:first-child { border-left: none; }
.ck-class-actions button i { font-size: 0.95rem; }
.ck-class-actions button:hover { background: var(--bg-light); color: var(--cc, var(--primary)); }
.ck-class-actions button:active { background: var(--bg-light); transform: scale(0.97); }

/* ตัวกรองห้องเรียน — อยู่เหนือการ์ดเพื่อให้ครูแยกปี/ระดับได้ก่อนเริ่มไล่สายตา */
.ck-classroom-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.ck-classroom-filter-summary { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ck-classroom-filter-summary > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-classroom-filter-summary strong { font-size: 0.86rem; color: var(--text-main); }
.ck-classroom-filter-summary #classroom-filter-summary { font-size: 0.75rem; color: var(--text-muted); }
.ck-classroom-filter-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
}
.ck-classroom-filter-controls { display: flex; align-items: center; gap: 10px; }
.ck-classroom-filter-field { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.ck-classroom-filter-field > span { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.ck-classroom-filter-field select {
  min-width: 146px;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  background-color: var(--bg-light);
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.ck-classroom-filter-field select:hover,
.ck-classroom-filter-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.ck-classroom-number-hint { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 0.72rem; color: var(--text-muted); }
.ck-classroom-number-hint b { padding: 2px 8px; border-radius: 999px; background: var(--bg-light); border: 1px solid var(--border-color); color: var(--text-secondary); font-weight: 700; }
.ck-class-stage-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px;
  border: 1px solid var(--border-color); border-radius: 13px; background: var(--bg-light);
}
.ck-class-stage-tab {
  min-height: 50px; padding: 7px 12px; border: 1px solid transparent; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; background: transparent;
  color: var(--text-muted); font: inherit; cursor: pointer; transition: var(--transition-normal);
}
.ck-class-stage-tab span { font-size: 0.9rem; font-weight: 800; }
.ck-class-stage-tab:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.7); }
.ck-class-stage-tab.active { border-color: var(--primary); background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(34, 160, 90, 0.12); }
.ck-class-stage-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ck-class-name-field { display: flex; align-items: stretch; }
.ck-class-name-field > span {
  min-width: 50px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color);
  border-right: 0; border-radius: 10px 0 0 10px; background: var(--primary-light); color: var(--primary);
  font-size: 0.95rem; font-weight: 800;
}
.ck-class-name-field .form-control { border-radius: 0 10px 10px 0; }
.ck-class-name-field:focus-within > span { border-color: var(--primary); }
.ck-classroom-filter-empty { min-height: 240px; justify-content: center; align-items: center; text-align: center; gap: 10px; }

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-normal);
}

.btn:hover { filter: brightness(0.97); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(29,158,117,0.16);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 5px 14px rgba(29,158,117,0.22);
}

.btn-danger {
  background-color: var(--color-absent-bg);
  color: var(--color-absent);
  border-color: #ffc7c4;
}

.ck-card-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px;
  font-size: 0.66rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ck-card-btn i { font-size: 0.82rem; }
.ck-card-btn:hover { background: var(--bg-hover, #f5f5f7); color: var(--text-main); }
.ck-card-btn.danger { color: var(--text-secondary); }
.ck-card-btn.danger:hover { color: var(--color-absent); border-color: #ffc7c4; background: var(--color-absent-bg); }

/* ปุ่ม ⋮ บนหัวการ์ด + เมนู overflow (แก้ไข/นำเข้า/สถิติ/ลบ) */
.ck-class-menu-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 6px;
  margin: -4px -6px 0 0;
  border-radius: var(--radius-btn);
  font-size: 1.2rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.ck-class-menu-btn:hover { background: var(--bg-light); color: var(--text-main); }
.ck-class-menu {
  position: absolute;
  z-index: 1200;
  min-width: 172px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: ckMenuIn 0.13s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes ckMenuIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.ck-class-menu button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-main);
}
.ck-class-menu button i { font-size: 1rem; width: 18px; text-align: center; color: var(--text-secondary); }
.ck-class-menu button:hover { background: var(--bg-light); }
.ck-class-menu button.danger { color: var(--color-absent); }
.ck-class-menu button.danger i { color: var(--color-absent); }
.ck-class-menu button.danger:hover { background: var(--color-absent-bg); }

/* ชื่อห้องบนหัวจอ — แตะเพื่อสลับห้อง (เห็นว่ากดได้จาก cursor + ไฮไลต์ตอน hover/แตะ) */
.ck-class-switch { cursor: pointer; border-radius: 8px; transition: background 0.15s; }
.ck-class-switch:hover { background: var(--bg-light); }
.ck-class-switch:active { transform: scale(0.98); }

/* ลูกศรท้ายชื่อห้อง — บอกว่ากดสลับห้องได้ (มือถือไม่มี hover เลยไม่มีอะไรบอกมาก่อน)
   วาดด้วย border ไม่ใช้ตัวอักษร ⌄ เพราะฟอนต์ไทยจัดแนวตั้งไม่ตรงกัน
   ใส่ที่ ::after เพราะเนื้อในหัวจอถูกเขียนทับด้วย innerHTML ทุกครั้งที่ render */
.ck-class-switch::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  flex-shrink: 0;
}
/* มีห้องเดียว = สลับไปไหนไม่ได้ (openClassSwitcher return ทันที) → ซ่อนลูกศร ไม่หลอกให้กด */
body.ck-one-class .ck-class-switch::after { display: none; }

/* แถบแท็บภายในห้อง (detail tabs) — เสียบใต้หัวจอทุกหน้า */
.ck-classtab-bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: calc(var(--radius-btn) + 4px);
  padding: 4px;
  margin: 0 auto 16px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.ck-classtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 7px 17px;
  border-radius: var(--radius-btn);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.ck-classtab i { font-size: 1rem; }
.ck-classtab.active { font-weight: 700; color: var(--primary); }
.ck-classtab:not(.active):hover { background: rgba(0, 0, 0, 0.04); color: var(--text-main); }

/* ===== ตัวเลื่อน (thumb) ใต้แท็บที่เลือก — วิ่งตามตอนสลับหน้า =====
   แถบแท็บถูก render ใหม่ทุกครั้งที่เปลี่ยนหน้า เลยต้องจำ index เดิมไว้
   แล้ววาง thumb ที่ตำแหน่งเดิมก่อน ค่อยสั่งให้วิ่งไปตำแหน่งใหม่ (ดู positionClassTabThumb ใน classrooms.js) */
.ck-classtab-bar { position: relative; }
.ck-classtab { position: relative; z-index: 1; }
/* กันพลาด: ถ้า thumb ยังไม่ถูกจัดตำแหน่ง (เช่น rAF ไม่ทำงานตอนแท็บถูกซ่อน)
   ให้ปุ่ม active มีพื้นขาวเองไปก่อน จะได้ไม่มีทางที่แท็บที่เลือกอยู่จะไม่มีไฮไลต์เลย */
.ck-classtab-bar:not(.thumb-ready) .ck-classtab-thumb { opacity: 0; }
.ck-classtab-bar:not(.thumb-ready) .ck-classtab.active {
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.ck-classtab-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  z-index: 0;
  width: 0;
  border-radius: var(--radius-btn);
  /* แม่แบบเดียวกับแถบแท็บหน้ารายงาน (.report-tab-item.active): ขาว + เงา ไม่มีกรอบ */
  background: #fff;
  box-shadow: var(--shadow-sm);
  /* สปริงนิดๆ ให้รู้สึกมีชีวิต ไม่ใช่เลื่อนแข็งๆ */
  transition: transform 0.34s cubic-bezier(0.34, 1.4, 0.64, 1),
              width 0.34s cubic-bezier(0.34, 1.4, 0.64, 1);
  will-change: transform, width;
}
/* ไอคอนของแท็บที่เพิ่งถูกเลือก เด้งรับหนึ่งจังหวะ
   เด้งเฉพาะตอน "เปลี่ยนแท็บจริง" (bar ได้คลาส tab-moved) — ไม่งั้นพิมพ์ค้นหาในหน้านักเรียน
   ซึ่ง render แถบใหม่ทุกตัวอักษร จะเด้งรัวทุกครั้งที่กดแป้น */
.ck-classtab-bar.tab-moved .ck-classtab.active i {
  animation: ckTabPop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ckTabPop {
  0%   { transform: scale(0.6); }
  55%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
/* เคารพผู้ใช้ที่ปิดแอนิเมชันในระบบ */
@media (prefers-reduced-motion: reduce) {
  .ck-classtab-thumb { transition: none; }
  .ck-classtab-bar.tab-moved .ck-classtab.active i { animation: none; }
}

/* ชื่อนักเรียนที่กดดูสรุปได้ */
.ck-student-name-link { cursor: pointer; transition: color 0.15s; }
.ck-student-name-link:hover { color: var(--primary); text-decoration: underline; }

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition-normal);
}
.btn-text:hover { color: var(--text-main); }

.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.form-group label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.form-control {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-normal);
  background-color: var(--bg-card);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,158,117,0.10); }

/* ปุ่ม/ช่องกรอกมุมขวาบนของหัวจอ — สเปกเดียวทุกหน้า (เช็คชื่อ/คะแนน/นักเรียน/การเข้าเรียน)
   ต้องสูงเท่ากันเป๊ะ ไม่งั้นหัวจอสูงไม่เท่ากัน แล้วแถบแท็บใต้มันเด้งตอนสลับหน้า
   ต้องอยู่หลัง .btn/.form-control เพื่อให้ชนะ (specificity เท่ากัน ตัวหลังชนะ)
   เฉพาะจอคอม/แท็บเล็ต — มือถือคงสเปกกระชับเดิมใน 08-responsive */
@media (min-width: 769px) {
  .ck-hdr-action {
    height: 39px;
    padding: 0 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-btn);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    box-sizing: border-box;
  }
}
/* ไอคอนในปุ่มหัวจอใช้สี accent เหมือนกันทุกหน้า
   (เดิมหน้าเช็คชื่อใส่ inline เขียวไว้หน้าเดียว หน้าอื่นเป็นสีดำ เลยดูคนละปุ่ม) */
.ck-hdr-action i { color: var(--primary); }
/* ยกเว้นปุ่มที่มีชุดสีของตัวเอง (พิมพ์/PDF, Export Excel) — ไอคอนตามสีตัวอักษรของปุ่ม */
.ck-hdr-action.is-tinted i { color: inherit; }
/* สีไอคอนแยกตามฟังก์ชัน (กรอบ/ตัวอักษรคงเดิม) — ใช้ได้ทุกปุ่มหัวจอ */
.ck-ic-purple i { color: #8b5cf6 !important; }
.ck-ic-blue i { color: #3b7fd4 !important; }
.ck-ic-gray i { color: var(--text-secondary) !important; }

/* Help center */
.ck-help-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.ck-help-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-light-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.ck-help-hero h2 { font-size: 1.45rem; font-weight: 800; margin-bottom: 5px; }
.ck-help-hero p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; max-width: 620px; }
.ck-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ck-help-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}
.ck-help-card strong,
.ck-help-card small {
  text-decoration: none;
}
.ck-help-card:hover { border-color: var(--primary-light-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ck-help-card:active { transform: scale(0.98); }
.ck-help-card.is-pending { cursor: default; }
.ck-help-card.is-pending:hover { border-color: var(--border-color); box-shadow: var(--shadow-sm); transform: none; }
.ck-help-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.2rem;
}
.ck-help-card strong { display: block; color: var(--text-main); font-size: 0.98rem; }
.ck-help-card small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.55; }
.ck-help-tour-status { display: none; align-items: center; gap: 4px; margin-top: 7px; color: var(--primary); font-size: 0.76rem; font-weight: 800; }
.ck-help-card.is-completed { border-color: var(--primary-light-border); }
.ck-help-card.is-completed .ck-help-tour-status { display: inline-flex; }
@media (max-width: 768px) {
  .ck-help-hero { padding: 18px; border-radius: 18px; }
  .ck-help-hero h2 { font-size: 1.22rem; }
  .ck-help-hero p { font-size: 0.84rem; }
  .ck-help-grid { grid-template-columns: 1fr; gap: 10px; }
  .ck-help-card { border-radius: 16px; padding: 14px; }
  .ck-help-icon { width: 40px; height: 40px; border-radius: 14px; }
}

.ck-line-help-modal { width: 420px; max-width: calc(100vw - 24px); }
.ck-line-help-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 16px 18px; text-align: center; }
.ck-line-help-body p { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.ck-line-help-body strong { color: var(--primary-deep); font-size: 0.95rem; }
.ck-line-help-qr { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 8px; box-shadow: var(--shadow-sm); }

/* Local prototype: class join activity */
.btn.ck-checkin-activity-btn {
  background: var(--primary-light);
  color: var(--primary-deep);
  border: 1px solid var(--primary-light-border);
}
.ck-join-sheet {
  width: min(1120px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: 92vh;
  overflow-y: auto;
}
.ck-join-class-label {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.ck-join-prototype-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--primary-light-border);
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary-deep);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.55;
}
.ck-join-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.45fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}
.ck-join-layout-bottom {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 16px;
}
.ck-join-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.ck-join-section-title {
  margin-bottom: 12px;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}
.ck-join-panel .form-group {
  margin-bottom: 14px;
}
.ck-join-panel textarea.form-control {
  min-height: 88px;
  resize: vertical;
}
.ck-join-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ck-join-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.ck-join-share {
  align-self: start;
  position: sticky;
  top: 0;
  text-align: center;
}
.ck-join-qr,
.ck-join-qr-img {
  width: 176px;
  height: 176px;
  margin: 0 auto 10px;
  border: 10px solid var(--bg-card);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}
.ck-join-qr {
  background:
    linear-gradient(90deg, var(--text-main) 10px, transparent 10px) 0 0/28px 28px,
    linear-gradient(var(--text-main) 10px, transparent 10px) 0 0/28px 28px,
    var(--bg-light);
}
.ck-join-qr-img {
  display: block;
  background: var(--bg-card);
  object-fit: contain;
}
.ck-join-code {
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 3px;
}
.ck-join-link {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.ck-join-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.ck-join-mini-stats span {
  padding: 10px;
  border-radius: 14px;
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.ck-join-mini-stats b {
  display: block;
  color: var(--text-main);
  font-size: 1.2rem;
}
.ck-join-live-wall,
.ck-join-pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 170px;
}
.ck-join-answer-card {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-light);
}
.ck-join-answer-card strong {
  display: block;
  color: var(--primary-deep);
  font-size: 0.82rem;
  margin-bottom: 3px;
}
.ck-join-answer-card span {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
}
.ck-join-count-wall {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  border-radius: 18px;
  background: var(--primary-light);
  border: 1px solid var(--primary-light-border);
}
.ck-join-count-wall span {
  color: var(--primary);
  font-size: 2.4rem;
  font-weight: 800;
}
.ck-join-count-wall strong {
  color: var(--primary-deep);
  font-size: 0.95rem;
}
.ck-join-count-wall small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.ck-join-student-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-card);
}
.ck-join-student-row strong {
  display: block;
  font-size: 0.86rem;
}
.ck-join-student-row span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}
.ck-join-student-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
}
.ck-join-student-row em.is-matched {
  color: var(--color-present);
  background: var(--color-present-bg);
}
.ck-join-student-row em.is-pending {
  color: var(--color-late-text);
  background: var(--color-late-bg);
}
.ck-join-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}
@media (max-width: 1020px) {
  .ck-join-sheet {
    width: min(760px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }
  .ck-join-sheet {
    max-height: 94vh;
  }
  .ck-join-layout,
  .ck-join-layout-bottom {
    grid-template-columns: 1fr;
  }
  .ck-join-share {
    position: static;
  }
  .ck-join-qr,
  .ck-join-qr-img {
    width: 156px;
    height: 156px;
  }
}
@media (max-width: 640px) {
  .ck-join-sheet {
    width: 100vw;
    max-width: 100vw;
    border-radius: 24px 24px 0 0;
  }
  .ck-join-two-col {
    grid-template-columns: 1fr;
  }
  .ck-join-panel {
    padding: 16px;
  }
  .ck-join-actions .btn {
    width: 100%;
  }
}

/* Public join page (local prototype) */
.ck-public-join {
  min-height: 100dvh;
  padding: 18px;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
}
.ck-public-phone {
  width: 100%;
  max-width: 430px;
}
.ck-public-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 24px 24px 0 0;
  background: var(--primary);
  color: #fff;
}
.ck-public-head img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}
.ck-public-head strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}
.ck-public-head span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.86;
}
.ck-public-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.ck-public-card:last-child {
  border-radius: 0 0 24px 24px;
}
.ck-public-question {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--primary-light-border);
  border-radius: 18px;
  background: var(--primary-light);
}
.ck-public-question span {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}
.ck-public-question strong {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.6;
}
.ck-public-answer-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ck-public-choice,
.ck-public-scale label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 800;
}
.ck-public-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.ck-public-scale label {
  justify-content: center;
  padding: 10px 6px;
}
.ck-public-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ck-public-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 800;
}
.ck-public-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ck-public-note {
  margin: 12px 0 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.65;
}
.ck-public-success {
  text-align: center;
  padding: 28px 18px;
}
.ck-public-success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
}
.ck-public-success strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 1.08rem;
}
.ck-public-success span {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.65;
}
