/* assets/css/style.css - ระบบสไตล์และดีไซน์หลัก เว็บไซต์ระบบประเมินผลการปฏิบัติงานครู PA */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary: #1e3a8a;          /* Deep Royal Blue */
  --primary-light: #2563eb;    /* Vibrant Blue */
  --primary-soft: #eff6ff;     /* Light Sky Soft */
  --accent: #0284c7;           /* Sky Cyan Accent */
  --accent-gold: #d97706;      /* Academic Gold */
  --success: #059669;         /* Emerald */
  --success-soft: #ecfdf5;
  --dark: #0f172a;            /* Slate 900 */
  --dark-soft: #1e293b;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Kanit', sans-serif;
  color: var(--dark);
  font-weight: 600;
  line-height: 1.3;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Top bar with school brand */
.top-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
  color: #f1f5f9;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar-links a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
}

.top-bar-links a:hover {
  color: #ffffff;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.brand-text h1 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  font-weight: 400;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.82rem;
  font-weight: 500;
  font-size: 0.915rem;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-menu > li > a:hover {
  color: var(--primary-light);
  background-color: var(--primary-soft);
}

.nav-menu > li > a.active {
  color: var(--primary-light);
  background-color: var(--primary-soft);
  font-weight: 600;
}

.nav-menu > li > a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--primary-light);
  border-radius: 2px;
}

/* Nav Dropdown for ข้อตกลง PA */
.nav-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-toggle .nav-chevron {
  font-size: 0.7rem;
  margin-left: 2px;
  transition: transform 0.22s ease;
}

.nav-dropdown-wrapper:hover .nav-dropdown-toggle .nav-chevron,
.nav-dropdown-wrapper.open .nav-dropdown-toggle .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 320px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li {
  list-style: none;
}

.nav-dropdown-menu .dropdown-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.65rem 0.8rem !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  transition: all 0.16s ease !important;
  position: static !important;
}

.nav-dropdown-menu .dropdown-link::after {
  display: none !important;
}

.nav-dropdown-menu .dropdown-link:hover {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  transform: translateX(3px);
}

.nav-dropdown-menu .dropdown-link.active {
  background: #eff6ff !important;
  color: var(--primary) !important;
}

.dropdown-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.dropdown-item-icon.icon-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.dropdown-item-icon.icon-emerald {
  background: #d1fae5;
  color: #047857;
}

.dropdown-item-icon.icon-slate {
  background: #f1f5f9;
  color: #475569;
}

.dropdown-item-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dropdown-item-text strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}

.dropdown-item-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.35rem 0.5rem;
}

.nav-admin-item {
  margin-left: 0.35rem;
}

.nav-admin-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white !important;
  padding: 0.5rem 1.05rem !important;
  border-radius: 30px !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  white-space: nowrap;
}

.nav-admin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--dark);
  font-size: 1.25rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%);
  color: white;
  padding: 4.5rem 0 5rem 0;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(30, 58, 138, 0) 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
  filter: blur(40px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: #bfdbfe;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: 'Prompt', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0369a1);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.btn-light {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-2px);
}

.hero-stats-row {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item h4 {
  color: #38bdf8;
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.stat-item p {
  color: #cbd5e1;
  font-size: 0.85rem;
}

/* Hero Teacher Card */
.hero-card-wrap {
  position: relative;
}

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.hero-card-img-box {
  width: 100%;
  height: 330px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.hero-card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-card-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.hero-card-info h3 {
  color: white;
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.hero-card-info p {
  color: #93c5fd;
  font-size: 0.9rem;
}

/* Quick Portal Menu Grid on Homepage (เมนูลัดนำทางบนหน้าแรก) */
.portal-menu-section {
  position: relative;
  z-index: 20;
  margin-top: -2.75rem;
  margin-bottom: 2rem;
}

.portal-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.portal-menu-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.portal-menu-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.portal-menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -4px rgba(37, 99, 235, 0.16), 0 6px 14px -2px rgba(15, 23, 42, 0.06);
  border-color: #bfdbfe;
}

.portal-menu-card:hover::before {
  opacity: 1;
}

.portal-menu-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.portal-menu-card:hover .portal-menu-icon {
  transform: scale(1.08);
}

.portal-menu-content {
  flex-grow: 1;
  min-width: 0;
}

.portal-menu-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
  transition: color 0.15s ease;
}

.portal-menu-card:hover .portal-menu-content h4 {
  color: var(--primary);
}

.portal-menu-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-menu-arrow {
  font-size: 0.9rem;
  color: #cbd5e1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.portal-menu-card:hover .portal-menu-arrow {
  color: var(--primary);
  transform: translateX(4px);
}

/* Sections */
.section-py {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 30px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 2.15rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Teacher Context Bar (บนหน้าแฟ้มผลงานรายบุคคล) */
.teacher-context-bar {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.teacher-context-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.teacher-context-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.back-to-directory-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.2s ease;
}

.back-to-directory-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.teacher-avatar-mini {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #38bdf8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.teacher-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-context-meta {
  font-size: 0.925rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.viewing-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.standing-badge {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
}

.dept-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.teacher-context-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.teacher-context-switcher select {
  padding: 0.4rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  background: white;
  color: var(--dark);
  outline: none;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ========================================================
   Central Teacher Directory Portal Styles (ทำเนียบคณะครูบนหน้าแรก)
   ======================================================== */
.directory-toolbar {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
  margin-bottom: 2.5rem;
}

.directory-form-grid {
  display: grid;
  grid-template-columns: 2fr 1.25fr 1.25fr auto;
  gap: 1rem;
  align-items: center;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box i {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 1rem;
}

.search-input-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-input-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filter-box select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  outline: none;
  font-family: inherit;
  background: white;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-box select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}

.teacher-dir-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.teacher-dir-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -8px rgba(37, 99, 235, 0.16);
  border-color: #93c5fd;
}

.teacher-card-top {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  padding: 2.25rem 1.75rem 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow: hidden;
}

.teacher-card-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.teacher-card-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  background: #1e293b;
}

.teacher-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-card-title-wrap {
  position: relative;
  z-index: 2;
  flex-grow: 1;
}

.teacher-standing-tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  margin-bottom: 0.4rem;
}

.teacher-card-name {
  font-size: 1.25rem;
  color: white;
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
}

.teacher-card-dept {
  font-size: 0.825rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.teacher-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.teacher-card-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.teacher-subjects-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.subject-tag {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.775rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Card Quick Stats Metrics Row */
.teacher-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  margin-top: auto;
  margin-bottom: 1.5rem;
  border: 1px solid #f1f5f9;
  text-align: center;
}

.metric-item strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.1;
}

.metric-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.teacher-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.teacher-card-actions .btn-main {
  flex-grow: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.teacher-card-actions .btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.teacher-card-actions .btn-sub {
  padding: 0.65rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.teacher-card-actions .btn-sub:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #bfdbfe;
}

/* Teacher Profile Component */
.profile-overview-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.profile-main-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}

.profile-avatar-frame {
  position: relative;
  text-align: center;
}

.profile-avatar-img {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  object-position: center top;
  box-shadow: var(--shadow-lg);
}

.profile-tag-rank {
  margin-top: 1rem;
  display: inline-block;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  padding: 0.4rem 1.25rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-details-body h2 {
  font-size: 1.85rem;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.profile-subtitle {
  color: var(--primary-light);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.profile-bio-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary-light);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 2rem;
  font-size: 0.975rem;
  color: var(--text-main);
  line-height: 1.7;
}

.info-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.info-badge-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.info-badge-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-soft);
  color: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-badge-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.info-badge-text strong {
  font-size: 0.95rem;
  color: var(--dark);
}

/* Timeline / Education */
.education-timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

.education-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.timeline-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Skills list */
.skills-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.skill-tag {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #dbeafe;
}

/* Tables for Subjects */
.custom-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: white;
}

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

.custom-table th {
  background: #f1f5f9;
  padding: 1rem 1.25rem;
  font-family: 'Kanit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 2px solid var(--border-color);
}

.custom-table td {
  padding: 1rem 1.25rem;
  font-size: 0.925rem;
  border-bottom: 1px solid var(--border-color);
}

.custom-table tr:hover td {
  background-color: #f8fafc;
}

/* PA Tabs & Accordions */
.pa-nav-tabs {
  display: flex;
  gap: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pa-nav-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Kanit', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.pa-nav-btn:hover {
  color: var(--primary);
  background: #f1f5f9;
}

.pa-nav-btn.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  background: white;
}

.pa-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.pa-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.pa-card-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: white;
  gap: 1rem;
  user-select: none;
}

.pa-badge-code {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pa-header-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark);
  flex-grow: 1;
}

.pa-arrow-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.pa-card.open .pa-arrow-icon {
  transform: rotate(180deg);
}

.pa-card-body {
  padding: 1.75rem;
  border-top: 1px solid var(--border-color);
  background: #fafafa;
  display: none;
}

.pa-card.open .pa-card-body {
  display: block;
}

.pa-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.pa-box {
  background: white;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.pa-box h5 {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pa-box p {
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: pre-line;
}

/* Activity / Innovation Cards */
.activity-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.activity-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.activity-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.activity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.activity-card:hover .activity-thumb img {
  transform: scale(1.05);
}

.activity-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.activity-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.activity-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.activity-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--dark);
}

.activity-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Gallery Grid & Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 260px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: white;
  transition: var(--transition);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.gallery-overlay p {
  color: #cbd5e1;
  font-size: 0.8rem;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  max-height: 90vh;
  position: relative;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  margin: 0 auto;
}

.lightbox-caption {
  color: white;
  margin-top: 1rem;
  font-size: 1.05rem;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Contact & Social Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.social-school-banner {
  background: linear-gradient(135deg, #1877f2, #0b5ed7);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.25);
}

.social-school-icon {
  font-size: 2.5rem;
  background: white;
  color: #1877f2;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-school-info h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.social-school-info p {
  font-size: 0.85rem;
  color: #dbeafe;
  margin-bottom: 0.5rem;
}

.social-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  color: #1877f2;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.social-link-btn:hover {
  background: #f8fafc;
  color: #0d6efd;
  transform: translateY(-1px);
}

.contact-list {
  list-style: none;
  margin-bottom: 2rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-icon-box {
  width: 40px;
  height: 40px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: white;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Map Embed */
.map-container {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 4rem 0 2rem 0;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-about p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links li a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links li a:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

/* Alert Boxes */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: var(--success-soft);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid var(--border-color);
    gap: 0.35rem;
    max-height: calc(100vh - 85px);
    overflow-y: auto;
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-dropdown-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-dropdown-wrapper .nav-dropdown-toggle {
    justify-content: space-between;
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    box-shadow: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    margin-top: 0.35rem;
    margin-left: 0.5rem;
    margin-bottom: 0.35rem;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-dropdown-wrapper.open .nav-dropdown-menu {
    display: block;
  }

  .nav-admin-item {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .nav-admin-btn {
    text-align: center;
    justify-content: center;
  }

  .portal-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
  }

  .hero-stats-row {
    justify-content: center;
  }

  .hero-card {
    max-width: 420px;
    margin: 0 auto;
  }

  .profile-main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-avatar-img {
    height: 320px;
    max-width: 320px;
    margin: 0 auto;
  }

  .pa-details-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .portal-menu-grid {
    grid-template-columns: 1fr;
  }

  .portal-menu-section {
    margin-top: -1.5rem;
  }
}

/* =========================================================
   Homepage Navbar Actions (ปุ่มบนแถบหัวเว็บหน้าแรก)
   ========================================================= */
.homepage-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-register-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-register-top:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.btn-login-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-login-top:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* Social Login & Register Buttons */
.social-signup-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-social-signup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-social-google {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-social-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.btn-social-google svg,
.btn-social-google img {
  width: 20px;
  height: 20px;
}

.btn-social-facebook {
  background: #1877f2;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(24, 119, 242, 0.3);
}

.btn-social-facebook:hover {
  background: #166fe5;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(24, 119, 242, 0.4);
  transform: translateY(-1px);
}

.btn-social-facebook i {
  font-size: 1.25rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 0.825rem;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 1rem;
  background: #ffffff;
}

/* =========================================================
   Teacher Context Bar (สำหรับหน้าแฟ้มผลงานรายบุคคล)
   ========================================================= */
.teacher-context-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 0;
  font-size: 0.875rem;
}

.teacher-context-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.teacher-context-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.back-to-directory-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  color: #1e40af;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.825rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.back-to-directory-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.teacher-avatar-mini {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #3b82f6;
  flex-shrink: 0;
}

.teacher-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-context-meta {
  color: #334155;
  font-size: 0.9rem;
}

.teacher-context-meta .viewing-tag {
  color: #64748b;
  font-size: 0.8rem;
  margin-right: 0.25rem;
}

.teacher-context-meta strong {
  color: #0f172a;
}

.teacher-context-meta .standing-badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.35rem;
}

.teacher-context-meta .dept-text {
  color: #64748b;
  font-size: 0.825rem;
}

.btn-back-to-all-teachers {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  font-size: 0.825rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-back-to-all-teachers:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}
