/* ==================== ทั่วไป ==================== */
* {
  box-sizing: border-box;
}
body {
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(135deg, 
    #0F4C9E 0%, 
    #1E6BCF 25%, 
    #3B9EFF 50%, 
    #2B7CDB 75%, 
    #0F3A8C 100%);
  background-attachment: fixed;
}
body.bg-white-app {
  background: #ffffff !important;
  background-attachment: scroll;
}
/* แก้ไข .ocean ให้ชิดขอบล่างสนิท */
.ocean {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50vh; /* ปรับความสูงตามต้องการ */
  z-index: -1;
  margin: 0;
  padding: 0;
  pointer-events: none; /* ป้องกันไม่ให้บังการคลิกเมนู */
}
.editorial {
  display: block;
  width: 100%;
  height: 100%; 
  margin: 0;
}
.parallax > use {
  animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% { 
    transform: translate3d(85px, 0, 0);
  }
}
/* จัดการสีคลื่นตาม Role (โค้ดเดิมของคุณ) */
body:not(.bg-white-app) .wave-layer1 { fill: rgba(255, 255, 255, 0.3); }
body:not(.bg-white-app) .wave-layer2 { fill: rgba(255, 255, 255, 0.2); }
body:not(.bg-white-app) .wave-layer3 { fill: rgba(255, 255, 255, 0.1); }

body.bg-white-app .wave-layer1 { fill: rgba(69, 121, 226, 0.6); } 
body.bg-white-app .wave-layer2 { fill: rgba(52, 97, 193, 0.5); }  
body.bg-white-app .wave-layer3 { fill: rgba(45, 85, 170, 0.7); }
/* --- Animation แบบ Bounce (เด้งไปกลับ) --- */
.parallax > use {
  animation: move-forever 12s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite alternate;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
@keyframes move-forever {
  0% { transform: translate(-90px, 0%); }
  100% { transform: translate(85px, 0%); }
}
/* ป้องกันคลื่นดูใหญ่เกินไปในจอเล็ก */
@media (max-width: 50em) {
  .ocean { height: 30vh; }
}
/* ==================== หน้า Login ==================== */
.login-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  background: #fff;
  margin: 20px auto;
  backdrop-filter: blur(10px);
}
.card-header {
  background: #fff;
  color: #333;
  text-align: center;
  font-size: 1.25rem;   
  font-weight: 700;
  padding: 25px 20px 15px;
  border-bottom: 1px solid #eee;
}
.card-header small {
  color: #666;
  font-size: 1.15rem;
}
.card-body {
  padding: 30px 35px;
}
.form-group {
  margin-bottom: 1.4rem;
}
.form-group p {
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}
.form-control {
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 12px 15px;
  font-size: 1rem;
  transition: all 0.3s;
}
.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
.input-group-append .btn {
  border-radius: 0 8px 8px 0;
  border: 1px solid #ced4da;
  border-left: none;
}
#togglePassword {
  padding: 0 15px;
}
#loginButton {
  margin-top: 10px;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border: none;
  transition: all 0.3s;
}
#loginButton:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
}
@media (max-width: 576px) {
  .login-card {
    margin: 15px;
    max-width: 100%;
  }
  .card-body {
    padding: 25px 20px;
  }
  .card-header {
    padding: 20px 15px 10px;
  }
}
@media (max-width: 360px) {
  .card-body {
    padding: 20px 15px;
  }
}
/* ==================== Navbar, Sidebar, Table ==================== */
.navbar, .sidebar, body section, .modal-content {
  font-family: 'Noto Sans Thai', 'Kanit', sans-serif !important;
}
.navbar {
  height: 70px;
  font-size: 16px;
}
.sidebar {
  font-size: 16px;
}
.sidebar .nav-link, .sidebar .nav-header,
.sidebar .user-panel .info h5 {
    font-size: 16px;
}
.main-header, .main-sidebar {
  background-color: #ffffff !important;
  color: #333 !important;
  transition: background-color 120ms, color 120ms;
}
.main-header .nav-link,
.main-sidebar .nav-link {
  color: #333 !important;
}
.nav-link.active {
  background-color: #BF4341 !important;
  color: #f2f2f2 !important;
  font-weight: bold !important;
}
.nav-link.active i {
  color: #f2f2f2 !important;
}
.main-sidebar .nav-item:hover {
  background-color: #F1F1F1;
  border-radius: 5px;
}
.main-sidebar .nav-link:hover {
  background-color: #F1F1F1;
}
/* ==================== Table & Form ==================== */
.container-fluid h1 {
  margin-top: 30px;
  margin-bottom: 10px;
}
table td, table th {
  text-align: center;
  vertical-align: middle;
}
#tablelist {
  text-align: left;
}
.btn-success {
  background-color: #108D77;
  border-color: #108D77;
  color: #fff;
}
.btn-success:hover {
  background-color: #186F65;
  border-color: #186F65;
}
/* Tabs */
/* .tabs .navtab a.active {
  color: #fff;
  background-color: #BF4341;
} */
/* Dropdown */
.dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
}
.dropdown-menu .dropdown-item i {
  min-width: 20px;
  margin-right: 8px;
}
@media (max-width: 576px) {
  .nav-tabs .nav-link {
    font-size: 14px;
    padding: 8px 10px;
  }
  .table td, .table th {
    font-size: 13px;
  }
}
/* SweetAlert */
.swal2-popup {
  border-radius: 15px;
}
/* content หลัก */
