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

/* Component Styles */
:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-main: 'Kanit', sans-serif;
    --font-heading: 'Kanit', sans-serif;

    /* Effects */
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(12px);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* Global Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* --- CSS เดิมของคุณ --- */
body {
    /* สมมติว่ามีการประกาศตัวแปรสีไว้ที่ :root แล้ว */
    /* color: var(--text-main); */
    font-family: var(--font-main);
    color: #333; /* ใส่สีสำรองไว้เผื่อทดสอบ */
    line-height: 1.6;
    min-height: 100vh;
    background: #f0f4f8;
    background-attachment: fixed;
    background-size: 100% 100%;
    position: relative; /* เพิ่มเพื่อความชัวร์ในการจัด Stack */
    overflow-x: hidden; /* ป้องกัน Scrollbar แนวนอนจาก Emoji */
}

/* พื้นหลังสีฟุ้งๆ เดิม (ยังคงอยู่) */
body::before {
    content: "";
    position: fixed;
    top: -100px;
    left: -100px;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(255,255,255,0) 70%);
    filter: blur(60px);
    z-index: -2; /* ลด z-index ลงเพื่อให้ Emoji อยู่ข้างหน้าสีฟุ้งๆ แต่อยู่หลังเนื้อหา */
    border-radius: 50%;
}
body::after {
    content: "";
    position: fixed;
    bottom: -100px;
    right: -100px;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(255,255,255,0) 70%);
    filter: blur(60px);
    z-index: -2; /* ลด z-index ลง */
    border-radius: 50%;
}

#emoji-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1; /* อยู่หลังสุด */
}

.floating-item {
    position: absolute;
    user-select: none;
    opacity: 0.15; /* ปรับให้จางลงอีกนิด จะได้ไม่กวนสายตาเพราะไอคอนมีสี */
    animation-name: hoverMotion;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes hoverMotion {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -30px) rotate(10deg); }
    66% { transform: translate(-20px, 15px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--primary-glow);
}


/* Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    border-radius: 16px;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Flexbox Utilities (Missing in BS3) */
.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.flex-grow-1 {
    flex-grow: 1;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

/* Spacing Utilities */
.m-0 {
    margin: 0;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.p-0 {
    padding: 0;
}

.p-4 {
    padding: 1.5rem;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

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

.text-warning {
    color: #f59e0b;
}

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

.small {
    font-size: 0.875rem;
}

.w-100 {
    width: 100%;
}

/* Responsive Utilities */
.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .p-4 {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1rem;
    }

    /* Stack flex containers on mobile if needed */
    .d-flex-mobile-stack {
        flex-direction: column;
        align-items: stretch;
    }

    /* Adjust font sizes */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}
/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    outline: none;
}

/* Cards */
.well {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
}

/* Navbar Overrides (will be fully replaced in layout.twig but styling here for safety) */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.navbar-default .navbar-nav>li>a {
    color: var(--text-muted);
}

.navbar-default .navbar-nav>li>a:hover,
.navbar-default .navbar-nav>.active>a {
    color: var(--primary);
    background: transparent;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table th {
    color: var(--text-muted);
    font-weight: 500;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table td {
    background: var(--bg-glass);
    padding: 1rem;
}

.table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.1);
}

/* Layout & Navigation */
.glass-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
}

.glass-navbar .container,
.glass-navbar .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
}

.brand-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links,
.nav-actions {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item.active a,
.nav-item a:hover {
    color: var(--text-main);
}

.nav-item.active a {
    position: relative;
}

.nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    border-radius: 2px;
}

/* Dropdowns */
.dropdown-wrapper {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-medium);
    box-shadow: var(--shadow-card);
}

.dropdown-wrapper:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content li a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
}

.dropdown-content li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: 80vh;
}

/* Footer */
.glass-footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-light);
        display: none;
    }

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

    .nav-links,
    .nav-actions {
        flex-direction: column;
        width: 100%;
    }
}

/* Fixes for Bugs */

/* Description Field (Panel Body) */
.panel-body {
    background: var(--bg-glass);
    color: var(--text-main);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    margin-top: 0.5rem;
}

/* Dropdown Options */
select option {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Search Dropdown */
.search-dropdown .input-wrapper {
    position: relative;
}

.search-dropdown input {
    background: var(--bg-glass);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}


/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive-stack {
        display: block;
        width: 100%;
    }

    .table-responsive-stack thead {
        display: none;
        /* Hide headers on mobile */
    }

    .table-responsive-stack tbody,
    .table-responsive-stack tr,
    .table-responsive-stack td {
        display: block;
        width: 100%;
    }

    .table-responsive-stack tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-light);
        border-radius: 10px;
        background: var(--bg-glass);
        overflow: hidden;
    }

    .table-responsive-stack td {
        text-align: right;
        padding: 0.75rem;
        position: relative;
        padding-left: 50%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .table-responsive-stack td:last-child {
        border-bottom: none;
    }

    /* Add labels for data */
    .table-responsive-stack td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: 45%;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
    }

    /* Specific adjustments for service table */
    #service-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding-left: 1rem;
        /* Reset padding */
    }

    #service-table thead {
        display: none;
    }

    #service-table tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
        background: var(--bg-glass);
        border-radius: 12px;
        padding: 1rem;
    }

    #service-table td {
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        color: white;
    }
}

.form-floating .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    color: var(--text-muted);
}

.form-floating .form-control:focus~label,
.form-floating .form-control:not(:placeholder-shown)~label {
    opacity: .65;
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Auth Specifics */
.auth-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.social-login-btn {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.social-login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .auth-sidebar {
        display: none;
    }

    .auth-content {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-floating .form-control::placeholder {
    color: transparent;
}



/* LOGIN START */
.login-section {
  font-family: 'Kanit', sans-serif; 
  color: #1f1f1f; 
  padding: 60px 0;
}

.hero-header {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3); 
}

.badge-rank {
  background-color: #6aabd6; 
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 20px;
}



.input-label {
  color: #1f1f1f;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}
.input-label i {
  margin-right: 8px;
  color: #3b82f6; /* ไอคอนสีฟ้า */
  font-size: 1rem;
}

.custom-dark-input {
  background-color: rgba(255, 255, 255, 0.1); 
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #1f1f1f; 
  padding: 10px 15px;
  width: 100%;
}

.custom-dark-input:focus {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  outline: none;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.btn-login-main {
  background: linear-gradient(45deg, #6aabd6, #8b99e8);
  color: white;
  border: none;
  padding: 10px 30px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(106, 198, 214, 0.4);
  transition: transform 0.2s;
}
.btn-login-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(214, 106, 115, 0.6);
}

.btn-google-dark {
  background-color: white;
  color: #333;
  border-radius: 25px;
  padding: 8px 15px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  
}

.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 20px;
}
.custom-checkbox-wrapper label {
  color: #bbb;
  font-size: 0.9rem;
  margin-left: 8px;
  margin-bottom: 0;
  cursor: pointer;
}

.bottom-links a {
  color: #6aabd6;
  text-decoration: none;
  font-weight: bold;
}
.bottom-links {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 20px;
}

.hero-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.floating-thumb {
  max-width: 250px; 
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.2)); 
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
.graphic-container {
  position: relative;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.glow-bg {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.4) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  animation: pulse 4s infinite;
  z-index: 0;
}

.main-hero-img {
  width: 320px;
  z-index: 2;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  animation: float-hero 6s ease-in-out infinite;
}

.social-icon-float {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 3;
}

.stat-glass-card {
  position: absolute;
  bottom: 40px;
  right: 20px;
  background: rgba(20, 30, 50, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 4;
  animation: float-card 5s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes float-hero { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(2deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 0.8; } }
@keyframes float-icon-1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10px, -15px); } }
@keyframes float-icon-2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -20px); } }
@keyframes float-card { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

.glass-form-section {
    /* สีพื้นหลังขาวแบบโปร่งแสง */
    background: rgba(255, 255, 255, 0.25);
    /* เอฟเฟกต์เบลอพื้นหลังด้านหลัง (หัวใจสำคัญของ Glassmorphism) */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%); /* สำหรับ Safari */
    
    /* เพิ่มขอบขาวบางๆ ให้ดูเหมือนสันแก้ว */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* เพิ่มเงาฟุ้งๆ ให้ดูลอยขึ้นมา */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    border-radius: 25px; /* มุมโค้ง */
    padding: 30px; /* ระยะห่างภายใน */
}

/* ปรับสี input เมื่ออยู่ภายในกล่องแก้ว ให้ดูเข้ากัน */
/* แก้ไข Style ของ Input เมื่ออยู่ในกล่องแก้ว */
.glass-form-section .custom-dark-input {
    /* 1. ปรับพื้นหลังให้ใสและสว่างขึ้นเล็กน้อย */
    background-color: rgba(255, 255, 255, 0.3);

    /* 2. หัวใจสำคัญ: เพิ่มการเบลอฉากหลังให้กับตัว Input เอง
       ทำให้ดูเหมือนแผ่นแก้วอีกชั้นวางซ้อนอยู่ */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* สำหรับ Safari */

    /* 3. ปรับขอบให้สว่างชัดขึ้น เหมือนสันของแก้ว */
    border: 1px solid rgba(255, 255, 255, 1);

    /* 4. เพิ่มเงาฟุ้งๆ เล็กน้อยเพื่อให้ input ดูลอยออกมาจากพื้นหลัง */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2); /* เงา inset ช่วยเพิ่มความนูน */

    color: #1f1f1f; /* สีข้อความเข้ม (ใช้สีเดียวกับ theme หลักจะดูดีกว่าดำสนิท #000) */
    
    /* เพิ่ม transition ให้นุ่มนวลเวลากด */
    transition: all 0.3s ease;
}

/* แถม: ปรับตอนกด Focus ให้ดูสว่างวาบขึ้น */
.glass-form-section .custom-dark-input:focus {
    background-color: rgba(255, 255, 255, 0.5); /* สว่างขึ้นตอนพิมพ์ */
    border-color: #ffffff; /* ขอบขาวจั๊วะ */
    box-shadow: 0 4px 12px rgba(106, 171, 214, 0.2); /* เงาสีฟ้าอ่อนๆ ตามธีม */
    outline: none;
}

/* ปรับสี Label ของ Checkbox ให้เข้มขึ้น เพราะของเดิมสีเทาอ่อน (#bbb) จะจมหายไปในพื้นหลังแก้ว */
.glass-form-section .custom-checkbox-wrapper label {
    color: #333; /* เปลี่ยนเป็นสีเทาเข้ม */
    font-weight: 500;
}

/* LOGIN END */

/* REGISTER START */
.auth-section { 
  font-family: 'Kanit', sans-serif; 
  color: #ffffff; 
  padding: 50px 0; 
  min-height: 90vh; 
  display: flex; 
  align-items: center; 
}

/* --- Headers & Text --- */
.auth-header { 
  font-size: 2.5rem; 
  font-weight: 700; 
  margin-bottom: 15px; 
  line-height: 1.3; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.3); 
  color: #1f1f1f;
}
.auth-desc {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* --- Badge --- */
.badge-new { 
  background: linear-gradient(90deg, #10B981, #059669); 
  color: white; 
  padding: 6px 18px; 
  border-radius: 30px; 
  font-size: 0.9rem; 
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px; 
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* --- Modern Input Styling (แบบใหม่ Label บน) --- */
.modern-label {
  color: #1f1f1f;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}
.modern-label i {
  margin-right: 8px;
  color: #3b82f6; /* ไอคอนสีฟ้า */
  font-size: 1rem;
}

.modern-input {
  background-color: rgba(255, 255, 255, 0.3); /* พื้นหลังใส */
  backdrop-filter: blur(10px); /* เบลอข้างใน */
  -webkit-backdrop-filter: blur(10px);
  
  border: 1px solid rgba(255, 255, 255, 0.6); /* ขอบสว่าง */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #1f1f1f; /* ตัวหนังสือสีเข้ม */
  padding: 12px 15px;
  height: 50px;
  width: 100%;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}

.glass-form-section .modern-input:focus {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(106, 171, 214, 0.3);
    color: #000;
}

/* ปรับ Placeholder ให้สีเข้มขึ้น */
.glass-form-section .modern-input::placeholder {
    color: #777;
}
/* --- Button Styling --- */
.btn-auth-main { 
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
  color: white; 
  border: none; 
  padding: 12px 30px; 
  border-radius: 10px; 
  font-weight: 700; 
  width: 100%; 
  cursor: pointer; 
  transition: all 0.3s ease; 
  font-size: 1.1rem;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}
.btn-auth-main:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5); 
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* --- Google Button --- */
.google-btn-custom-wrapper {
  position: relative;
  width: 100%;
  margin-top: 20px;
}
.btn-google-visual {
  background-color: #ffffff;
  color: #334155;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 600;
  border: none;
  transition: 0.3s;
  cursor: pointer;
}
.btn-google-visual:hover {
  background-color: #f8fafc;
}
.google-hidden-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.01; 
  z-index: 10;
  overflow: hidden;
}

/* --- Checkbox & Links --- */
.custom-control-label {
  color: #cbd5e1;
  font-size: 0.9rem;
  cursor: pointer;
  padding-top: 2px;
}
.custom-checkbox a {
  color: #3b82f6;
  text-decoration: none;
}

/* --- Right Side Graphic --- */
.graphic-container {
  position: relative;
  height: 550px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.glow-bg-signup {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  animation: pulse-signup 6s infinite;
  z-index: 0;
}
.main-img-signup {
  width: 80%;
  max-width: 450px;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
  animation: float-signup 7s ease-in-out infinite;
}

/* Animations */
@keyframes float-signup { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes pulse-signup { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.2); opacity: 0.6; } }

.alert {
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 25px;
  border: none;
  color: #ffffff !important; /* บังคับตัวหนังสือสีขาว */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  font-weight: 500;
}

/* สีพื้นหลังสำหรับ Error (สีแดงสด) */
.alert-danger {
  background-color: #ef4444; 
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* สีพื้นหลังสำหรับ Success (สีเขียวสด) */
.alert-success {
  background-color: #10b981;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* ปรับปุ่มปิด (x) ให้เป็นสีขาว */
.alert .close {
  color: #ffffff !important;
  text-shadow: none;
  opacity: 0.8;
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  padding: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
}
.alert .close:hover {
  opacity: 1;
  background: none;
}
.password-requirements-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.req-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.req-item {
    font-size: 0.85rem;
    color: #888; /* สีเทาเมื่อยังไม่ผ่าน */
    margin-bottom: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.req-item i {
    font-size: 0.5rem;
    margin-right: 8px;
    transition: all 0.3s ease;
}

/* เมื่อเงื่อนไขผ่าน (สีเขียว) */
.req-item.valid {
    color: #10B981; /* สีเขียว */
    font-weight: 500;
}

.req-item.valid i {
    content: "\f00c"; /* เปลี่ยนเป็น icon check (FontAwesome) */
    font-family: "Font Awesome 5 Free"; 
    font-weight: 900;
    font-size: 0.8rem;
}

.center-like {
  display: flex; 
  align-items: center; 
  justify-content: center;
  margin-top:15px;
}
/* REGISTER END */
/* NAVBAR START */
/* =============================================
   GLASS SIDEBAR LAYOUT
   ============================================= */
.terms-notification-bar {
    position: fixed;
    left: 50%; /* จัดกึ่งกลางแนวนอน */
    transform: translateX(-50%); /* ดึงกลับให้กลางเป๊ะ */
    bottom: -150px; /* ซ่อนไว้ก่อน */
    
    width: 95%; /* มือถือให้กว้างเกือบเต็ม */
    max-width: 800px; /* จอคอมจำกัดความกว้างไม่ให้ยาวเกินไป */
    
    background-color: #fff9db; /* สีพื้นเหลืองนวล */
    border: 1px solid #ffeeba;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); /* เงาลอยๆ */
    
    padding: 15px 20px;
    z-index: 9999;
    
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Flexbox จัดกลาง */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* คลาสสำหรับแสดงขึ้นมา */
.terms-notification-bar.show {
    bottom: 20px; /* ลอยขึ้นมาจากขอบล่าง 20px */
}

/* จัด Layout ภายใน label */
.custom-check-label {
    display: flex !important;
    align-items: flex-start !important; /* จัดชิดบน (เผื่อข้อความยาวหลายบรรทัด) */
    width: 100%;
    margin: 0;
    cursor: pointer;
}

/* กล่องสี่เหลี่ยม (Checkbox) */
.checkmark-box {
    width: 24px;
    height: 24px;
    min-width: 24px; /* สำคัญ! ห้ามหดเล็กกว่านี้ในมือถือ */
    background-color: #fff;
    border: 1.5px solid #666;
    border-radius: 6px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    margin-right: 15px; /* ระยะห่างจากข้อความ */
    margin-top: 2px; /* ดันลงนิดนึงให้ตรงกับบรรทัดแรกของข้อความ */
    flex-shrink: 0; /* สำคัญ! ห้ามโดนบีบ */
    transition: all 0.2s;
}

/* ข้อความเงื่อนไข */
.terms-text {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5; /* ระยะห่างบรรทัดให้อ่านง่าย */
    word-break: break-word; /* ตัดคำถ้ายาวเกิน */
}

.terms-text a {
    color: #3b82f6;
    text-decoration: underline;
    font-weight: 700;
    white-space: nowrap; /* คำว่า "ข้อกำหนด" ห้ามตัดคำ */
}

/* เมื่อติ๊กถูก */
.hidden-checkbox:checked + .checkmark-box {
    background-color: #3b82f6;
    border-color: #3b82f6;
}
.hidden-checkbox:checked + .checkmark-box::after {
    content: '\f00c';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    font-size: 14px;
}

/* --- Responsive Adjustments (มือถือ) --- */
@media (max-width: 768px) {
    .terms-notification-bar.show {
        bottom: 10px; /* มือถือให้ชิดขอบล่างมากขึ้น */
        width: 95%; /* กว้างเกือบเต็มจอ */
        padding: 12px 15px;
    }

    .terms-text {
        font-size: 0.85rem; /* ลดขนาดตัวอักษรนิดนึง */
    }
    
    .checkmark-box {
        width: 20px; /* ลดขนาดกล่องนิดนึง */
        height: 20px;
        min-width: 20px;
        margin-top: 3px;
    }
    
    .hidden-checkbox:checked + .checkmark-box::after {
        font-size: 11px;
    }
}
/* 1. Wrapper หลัก */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 2. Sidebar ฝั่งซ้าย */
.glass-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.7); /* พื้นหลัง Sidebar */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

/* Logo */
.sidebar-header {
    margin-bottom: 30px;
    text-align: center;
}
.sidebar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
    text-decoration: none;
}
.sidebar-brand span { color: #3b82f6; }
.sidebar-brand img { max-height: 40px; }

/* User & Balance Card */
.sidebar-user-card {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    text-align: center;
}
.user-info .username { font-weight: 600; font-size: 1.1rem; }
.user-info .balance-label { font-size: 0.8rem; opacity: 0.8; margin-bottom: 5px; }
.user-balance {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}
.btn-deposit-sidebar {
    display: block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}
.btn-deposit-sidebar:hover {
    background: white;
    color: #2563eb;
    text-decoration: none;
}

/* Menu List */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-menu li { margin-bottom: 5px; }
.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-menu li.active a,
.sidebar-menu li a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}
.sidebar-menu .icon-placeholder {
    width: 25px;
    text-align: center;
    margin-right: 10px;
    font-size: 0.9rem;
}
.sidebar-menu li.active .icon-placeholder i {
    font-size: 0.7rem; /* Active dot smaller */
}

.menu-divider {
    height: 1px;
    background: rgba(0,0,0,0.05);
    margin: 15px 0;
}

/* 3. Main Content ฝั่งขวา */
.dashboard-content {
    margin-left: 260px; /* เว้นที่ให้ Sidebar */
    width: calc(100% - 260px);
    padding: 30px;
    padding-top: 40px;
    min-height: 100vh;
}

/* --- Responsive (Mobile) --- */
.mobile-header {
    display: none; /* ซ่อนใน PC */
}

@media (max-width: 992px) {
    .glass-sidebar {
        transform: translateX(-100%); /* ซ่อน Sidebar ไปทางซ้าย */
    }
    .glass-sidebar.show-mobile {
        transform: translateX(0); /* แสดงเมื่อกดปุ่ม */
    }
    .dashboard-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    /* Mobile Header Bar */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        background: rgba(255,255,255,0.8);
        padding: 10px 15px;
        border-radius: 12px;
        backdrop-filter: blur(10px);
    }
    .btn-toggle-sidebar {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #333;
    }
    .mobile-logo {
        font-weight: 800;
        color: #3b82f6;
    }
}

/* ปรับขนาดช่องใส่ไอคอน/Emoji */
.sidebar-menu .icon-placeholder {
    width: 30px; /* เพิ่มความกว้างช่องนิดหน่อย */
    text-align: center;
    margin-right: 12px;
    display: inline-block;
}

/* คลาสพิเศษสำหรับ Emoji ให้อยู่กึ่งกลางสวยๆ */
.emoji-icon {
    font-size: 1.3rem; /* ขนาด Emoji */
    line-height: 1;
    vertical-align: middle;
    margin-top: -3px; /* ขยับขึ้นนิดนึงเพื่อให้ตรงกับตัวหนังสือ */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* เพิ่มเงาให้ Emoji ดูลอยมีมิติ */
}

/* ถ้าเมนูไหนยังใช้ FontAwesome (เช่นใน mobile header) ให้ใช้ขนาดเดิม */
.icon-placeholder i {
    font-size: 0.9rem;
}
/* NAVBAR END */





/* NEWORDER START */

#order-form::-webkit-scrollbar { 
    display: none; /* Chrome/Safari */
}
/* =============================================
   NEW ORDER PAGE - FULL STYLES
   Layout, Typography, Components & Grouping
   ============================================= */
/* ซ่อน Select2 ที่เด้งขึ้นมาในช่องหมวดหมู่ด้านซ้าย */
.col-category .select2-container {
    display: none !important;
}
/* --- 1. GLOBAL TEXT FIXES (Scoped to Dashboard) --- */
/* บังคับสีตัวอักษรให้เข้มชัดในทุกองค์ประกอบ */
.dashboard-grid .form-control,
.dashboard-grid .glass-input,
.glass-settings-card .form-control,
.glass-funds-card .form-control,
.glass-table-card .form-control {
    color: #000000 !important; /* สีดำสนิท */
    font-weight: 600 !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

.dashboard-grid input::placeholder,
.glass-settings-card input::placeholder,
.glass-funds-card input::placeholder {
    color: #6b7280 !important;
    opacity: 1;
}

.dashboard-grid label,
.dashboard-grid .glass-label,
.glass-settings-card label,
.glass-funds-card label,
.glass-table-card label {
    color: #111827 !important; 
    font-weight: 700 !important;
    font-size: 0.95rem;
    margin-bottom: 5px;
    display: block;
}

.glass-description-box {
    color: #1f2937 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    font-weight: 500 !important;
}
.glass-description-box strong, 
.glass-description-box b {
    color: #000000 !important;
    font-weight: 700 !important;
    text-decoration: underline;
}
.glass-description-box p, 
.glass-description-box span, 
.glass-description-box li {
    color: #1f2937 !important;
    font-size: 16px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #000000 !important;
    font-weight: 600;
}
.select2-results__option {
    color: #333333 !important;
}

.alert {
    color: #000000 !important;
    font-weight: 500;
}

/* --- 2. LAYOUT GRID SYSTEM --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr 350px; /* ซ้าย - กลาง - ขวา */
    gap: 25px;
    align-items: start;
    min-height: 700px;
}

/* Responsive: Mobile */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .col-category {
        max-height: 500px; /* จำกัดความสูงหมวดหมู่ในมือถือ */
    }
}

/* --- 3. GLASS COLUMNS --- */
.glass-column {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* ห้ามล้น */
  	max-height: 75vh;
}

.dashboard-grid {
    overflow: hidden;   /* คำสั่งสำคัญ: ห้ามเลื่อนส่วนที่เกิน */
}
/* =============================================
   STICKY COLUMNS (SCROLL FIX)
   ทำให้คอลัมน์กลางและขวาเลื่อนตาม Scroll
   ============================================= */

/* 1. กำหนดให้คอลัมน์ติดหนึบ */
.col-service, .col-input {
    position: sticky;
    height: calc(100vh - 40px); /* ความสูงเต็มจอ ลบระยะขอบ */
    overflow-y: auto; /* ให้ Scroll เนื้อหาภายในได้ */
    
    /* ปรับแต่ง Scrollbar ให้สวยงาม (ซ่อน scrollbar แต่เลื่อนได้) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.col-service::-webkit-scrollbar, 
.col-input::-webkit-scrollbar { 
    display: none; /* Chrome/Safari/Webkit */
}

/* 2. คอลัมน์หมวดหมู่ (ซ้าย) ก็ควร Fixed ไว้เช่นกัน */
.col-category {
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
}

/* 3. ปรับ Container ให้รองรับ Sticky */
.dashboard-grid {
    align-items: flex-start; /* ให้เริ่มจากด้านบนเสมอ */
    overflow: visible; /* สำคัญ! ถ้า parent overflow hidden sticky จะไม่ทำงาน */
}

.col-category {
    padding: 20px 0 0 0; /* Padding เฉพาะด้านบน */
}
.col-service, .col-input {
    padding: 25px;
}

.column-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 20px;
    padding-bottom: 15px;
    padding-left: 20px; /* เพิ่ม Padding ซ้าย */
    padding-right: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}
.column-header i { color: #3b82f6; }

/* --- 4. CATEGORY COLUMN COMPONENTS --- */

/* Search Box */
.category-search-box {
    padding: 0 20px;
    margin-bottom: 15px;
}
.glass-input-group-sm {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.glass-input-sm {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
    font-size: 0.95rem !important;
    padding: 0 10px !important;
    font-weight: 500;
}

/* Category List Container */
.category-list-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    padding-right: 5px;
}
.category-list-wrapper::-webkit-scrollbar { width: 4px; }
.category-list-wrapper::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }

/* Group Item (Accordion) */
.category-group-item {
    margin: 0 10px 8px 10px; /* เว้นขอบซ้ายขวานิดหน่อย */
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.2s ease;
}

.group-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 700;
    color: #1f2937;
    transition: background 0.2s;
    user-select: none;
}
.group-header:hover {
    background: rgba(255, 255, 255, 0.7);
}
.group-icon {
    width: 28px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.group-title { flex-grow: 1; font-size: 1.25rem; }
.badge-pill {
    background: rgba(0,0,0,0.1);
    color: #555;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.group-arrow {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #888;
    transition: transform 0.3s;
}

/* Group Content & Open State */
.group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.2);
}
.category-group-item.open {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-color: #fff;
}
.category-group-item.open .group-content {
    max-height: 2000px;
    padding-bottom: 8px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.category-group-item.open .group-arrow {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* Sub-Items (Services) */
.group-content .category-item {
    padding: 10px 15px 10px 45px;
    font-size: 1.2rem;
    color: #4b5563;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    margin: 2px 0;
    position: relative;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}
.group-content .category-item:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #111827;
}
.group-content .category-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 100%);
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 700;
}

/* Items with no group (Others) */
.category-item.no-group {
    padding: 12px 15px;
    border-radius: 10px;
    margin: 0 10px 5px 10px;
    background: rgba(255,255,255,0.4);
    font-weight: 600;
    color: #333;
}
.category-item.no-group.active {
    background: #3b82f6;
    color: white;
}

/* Hide Search in wrong place */
.col-category .glass-search-wrapper,
.col-category .input-wrapper,
.col-category > input[type="text"] {
    display: none !important;
}

/* --- 5. SERVICE & INPUT COLUMNS --- */
.glass-description-box {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    flex-grow: 1;
}

.col-input {
    background: rgba(255, 255, 255, 0.65);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.price-display-box { position: relative; }
.price-display-box .currency {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #2563eb;
    font-size: 1.2rem;
    z-index: 2;
}
.charge-input {
    padding-left: 30px !important;
    font-size: 1.4rem !important;
    height: 55px !important;
    color: #2563eb !important;
    font-weight: 800 !important;
}

.decoration-emoji {
    position: absolute;
    bottom: -15px;
    right: -10px;
    font-size: 6rem;
    opacity: 0.15;
    transform: rotate(-15deg);
    pointer-events: none;
}

/* Override Fields */
#fields .form-group { margin-bottom: 15px; }
#fields label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    font-size: 0.9rem;
}
#fields input, #fields textarea {
    background: white !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 10px !important;
    padding: 10px !important;
    min-height: 45px;
}

/* --- 6. SUBMIT BUTTON (Blue Pulse) --- */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

#order-form .btn-glass-submit,
#order-form button[type="submit"] {
    animation: pulse-blue 2s infinite;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    padding: 12px 20px !important;
    transition: all 0.3s ease !important;
}

#order-form .btn-glass-submit:hover,
#order-form button[type="submit"]:hover {
    animation: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6) !important;
}
#order-form .btn-glass-submit:active,
#order-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4) !important;
}

.category-search-box {
    padding: 0 20px;
    margin-bottom: 15px;
}

/* สร้างกล่องครอบใหม่ (Pill) */
.glass-search-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.6); /* พื้นหลังขาวใส */
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px; /* มุมมนสวยๆ */
    padding: 10px 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); /* เงาในเล็กน้อยให้ดูลึก */
    transition: all 0.3s ease;
}

/* Effect ตอนกดพิมพ์ */
.glass-search-pill:focus-within {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15); /* เงาสีฟ้าฟุ้ง */
    border-color: #ffffff;
    transform: translateY(-1px);
}

/* ไอคอนแว่นขยาย */
.glass-search-pill .search-icon {
    color: #6b7280; /* สีเทาเข้ม */
    font-size: 1rem;
    margin-right: 12px;
    opacity: 0.8;
}

/* ตัวช่อง Input */
.glass-search-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    font-size: 0.95rem !important;
    color: #1f2937 !important; /* สีตัวอักษรดำเข้ม */
    font-weight: 500;
    width: 100%;
}

.glass-search-input::placeholder {
    color: #9ca3af !important;
}

.glass-search-input:focus {
    outline: none !important;
}

#order-form .btn-glass-submit:disabled,
button:disabled {
    background: #cbd5e1 !important; /* สีเทา */
    color: #64748b !important;      /* ตัวหนังสือสีเทาเข้ม */
    cursor: not-allowed !important; /* เมาส์เป็นเครื่องหมายห้าม */
    box-shadow: none !important;    /* เอาเงาออก */
    transform: none !important;     /* ห้ามขยับ */
    animation: none !important;     /* ห้ามกระพริบ */
    opacity: 0.7;
}

.hidden-checkbox {
    display: none; /* ซ่อน Checkbox เดิม */
}

.custom-check-label {
    display: flex;
    align-items: center;
    gap: 12px; /* ระยะห่างระหว่างกล่องกับข้อความ */
    user-select: none;
}

.checkmark-box {
    width: 24px;
    height: 24px;
    background-color: #fff;
    border: 1.5px solid #333; /* ขอบสีดำบางๆ ตามรูป */
    border-radius: 6px; /* มุมมน */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0; /* ไม่ให้กล่องบี้เวลาข้อความยาว */
}

/* เมื่อติ๊กถูก */
.hidden-checkbox:checked + .checkmark-box {
    background-color: #3b82f6; /* สีฟ้า */
    border-color: #3b82f6;
}

/* สร้างเครื่องหมายถูก (Check Icon) */
.hidden-checkbox:checked + .checkmark-box::after {
    content: '\f00c'; /* FontAwesome Check Icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    font-size: 14px;
}

/* --- 2. Soft Blue Button (ปุ่มสีฟ้าพาสเทล) --- */
.btn-soft-submit {
    width: 100%;
    background-color: #93c5fd; /* สีฟ้าพาสเทล (Soft Blue) */
    /* หรือใช้ Gradient จางๆ แบบในรูป */
    background: linear-gradient(180deg, #9bcfff 0%, #8abcf5 100%);
    
    color: white;
    border: none;
    border-radius: 50px; /* ทรงแคปซูล (Pill Shape) */
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: 700; /* ตัวหนา */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    box-shadow: 0 4px 0 #76aae6, /* เงาแข็งด้านล่างให้ดูมีมิติแบบ 3D นิดๆ */
                0 10px 20px rgba(147, 197, 253, 0.4); /* เงาฟุ้ง */
    
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: 20px;
}

/* Effect ตอนชี้ */
.btn-soft-submit:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #8bc4ff 0%, #7aaef0 100%);
    box-shadow: 0 6px 0 #76aae6, 
                0 15px 25px rgba(147, 197, 253, 0.5);
}

/* Effect ตอนกด */
.btn-soft-submit:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #76aae6, inset 0 2px 5px rgba(0,0,0,0.1);
}

.custom-check-label {
    display: flex !important;        /* ใช้ Flexbox จัดเรียง */
    flex-direction: row !important;  /* เรียงเป็นแนวนอนซ้ายไปขวา */
    align-items: center !important;  /* จัดกึ่งกลางแนวตั้ง */
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* 2. จัดการตัวกล่องสี่เหลี่ยม */
.checkmark-box {
    flex-shrink: 0 !important;       /* ห้ามหดตัวเด็ดขาด */
    margin-right: 12px !important;   /* เว้นระยะห่างจากข้อความ */
    margin-bottom: 0 !important;     /* ลบขอบล่างทิ้ง */
    position: relative !important;   /* เพื่อความชัวร์ในการจัดตำแหน่ง */
}

/* 3. จัดการตัวข้อความ */
.text-label {
    display: inline-block !important; /* ให้เป็นบล็อกแนวนอน */
    margin: 0 !important;             /* ลบขอบรอบๆ */
    line-height: 1.4 !important;      /* ระยะห่างบรรทัด */
    text-align: left !important;
    flex-grow: 1;                     /* ให้ข้อความกินพื้นที่ส่วนที่เหลือ */
}

/* =============================================
   NOTICE BOX STYLING (NEW ORDER)
   ============================================= */

.glass-notice-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}

.notice-header {
    background: rgba(241, 245, 249, 0.6); /* สีหัวข้อเทาอ่อน */
    padding: 12px 15px;
    font-weight: 700;
    color: #334155;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-body {
    padding: 15px;
    max-height: 250px; /* ความสูงกล่อง (เลื่อนได้) */
    overflow-y: auto;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
}

.notice-section {
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    padding-bottom: 10px;
}
.notice-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.notice-section h6 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.notice-list {
    padding-left: 15px;
    margin: 0;
    list-style-type: disc;
}
.notice-list li {
    margin-bottom: 4px;
}

/* Symbol Grid */
.symbol-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* แบ่ง 2 คอลัมน์ */
    gap: 5px;
}
.symbol-grid span {
    background: rgba(255,255,255,0.6);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Scrollbar สวยๆ */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }

/* =============================================
   USER LEVEL CARD (NEW ORDER PAGE)
   ============================================= */
.avatar-circle {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
}

.user-email {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}


/* กล่องเลเวล */
.user-level-box {
    text-align: left;
    margin-top: 15px;
    padding: 0 2px;
}

/* ป้ายชื่อระดับ */
.level-badge {
    background: #fbbf24; /* สีเหลืองทอง */
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ป้ายส่วนลดใน Sidebar */
.badge-discount-sidebar {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* หลอดพลัง */
.glass-progress {
    height: 6px;
    background-color: rgba(0,0,0,0.2); /* พื้นหลังหลอดดำจางๆ */
    border-radius: 10px;
    margin: 5px 0;
    overflow: hidden;
}

.bg-gradient-warning {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.text-muted-light {
    color: rgba(255,255,255,0.6);
}
.user-level-card {
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.bg-gradient-primary {
        background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
        border-radius: 10px;
    }
/* ชื่อระดับ (ไล่สีทอง) */
.level-title {
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(45deg, #d97706, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* วงกลมตัวเลขระดับ */
.level-badge-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
    border: 3px solid rgba(255,255,255,0.5);
}

/* แถบความคืบหน้า */
.level-progress {
    height: 6px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}
.level-progress .progress-bar {
    background: linear-gradient(90deg, #fbbf24, #d97706);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.4);
}
/* NEWORDER END */














/* ACCOUNT START */
/* --- Glass Settings Card --- */
.glass-settings-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    padding: 30px;
    margin-bottom: 25px; /* ระยะห่างระหว่างการ์ด */
    position: relative;
    overflow: hidden;
}

/* หัวข้อของแต่ละการ์ด */
.card-header-glass {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}
.card-header-glass i {
    color: #3b82f6;
}

/* ปรับแต่งปุ่ม Save ในการ์ดเล็กๆ ให้ดูดี */
.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
    width: auto; /* ไม่ต้องเต็มจอ */
}

/* กล่อง API Key พิเศษ */
.api-key-box {
    position: relative;
}
.api-key-box input {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* --- Glass Modal (สำหรับหน้าเปลี่ยน Email) --- */
.glass-modal-content {
    background: rgba(255, 255, 255, 0.85); /* พื้นหลังเกือบทึบ */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.glass-modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.glass-modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* จัดการ Checkbox ในตารางให้กึ่งกลางและดูดี */
.glass-table th.text-center, 
.glass-table td.text-center {
    text-align: center;
    vertical-align: middle;
}

/* ขยายขนาด Checkbox ให้กดง่ายขึ้น */
.glass-checkbox {
    transform: scale(1.3); /* ขยายขนาด 1.3 เท่า */
    cursor: pointer;
    accent-color: #3b82f6; /* เปลี่ยนสีติ๊กถูกเป็นสีฟ้า (รองรับใน Chrome/Edge ใหม่ๆ) */
}

/* เพิ่ม Effect เวลาเอาเมาส์ชี้แถวตาราง */
.glass-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s;
}

/* ปรับฟอนต์หัวข้อแถวแรกให้หนา */
.glass-table td.font-weight-bold {
    font-weight: 600;
    color: #374151;
}
/* ACCOUNT END */

/* PAYMENT START */

.quick-amount-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* จัดเรียงอัตโนมัติ */
    gap: 10px;
    margin-top: 10px;
}

.amount-pill {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    border-radius: 12px;
    padding: 10px 5px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center; /* จัดตัวหนังสือกลาง */
    cursor: pointer; /* เปลี่ยนเมาส์เป็นรูปมือ */
    transition: all 0.2s ease;
    user-select: none; /* ห้ามลากคลุมดำตัวหนังสือ */
}

/* Effect ตอนเอาเมาส์ชี้ */
.amount-pill:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

/* Effect ตอนกด (ยุบลงไป) */
.amount-pill:active {
    transform: translateY(0) scale(0.95);
    box-shadow: none;
}
.glass-funds-card {
    background: rgba(255, 255, 255, 0.35); /* ใสกว่าปกตินิดนึงเพื่อให้ดูพรีเมียม */
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1); /* เงาสีฟ้าจางๆ */
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

/* แสงสะท้อนบนการ์ด */
.glass-funds-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 60%);
    opacity: 0.1;
    transform: rotate(30deg);
    pointer-events: none;
}

/* ช่องกรอกจำนวนเงินแบบพิเศษ */
.glass-input-group {
    display: flex;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.4);
}
.glass-addon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
    padding: 0 15px;
}
.glass-input-group .glass-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 60px !important; /* ใหญ่สะใจ */
}

/* ปุ่ม Pay ขนาดใหญ่ */
.btn-lg {
    padding: 15px 30px;
    font-size: 1.2rem;
    width: 100%;
    border-radius: 12px;
}

/* --- History Table Components --- */
.glass-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.amount-text {
    font-weight: bold;
    color: #059669; /* สีเขียว */
    font-family: monospace;
    font-size: 1.1rem;
}

/* Info Card สำหรับข้อความเพิ่มเติม */
.glass-info-card {
    background: rgba(255, 255, 255, 0.25);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 20px;
    color: #4b5563;
}

/* =========================================
   LIQUID GLASS SELECT BOX (เมนูเลือก)
   ========================================= */

/* --- 1. ปรับ Select แบบธรรมดา (<select>) --- */
select.form-control,
select.glass-input {
    background-color: rgba(255, 255, 255, 0.5) !important; /* พื้นหลังใส */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 12px !important;
    color: #1f2937 !important; /* สีตัวหนังสือเข้ม */
    font-weight: 500;
    cursor: pointer;
    appearance: none; /* ลบลูกศรเดิม (ถ้าต้องการใส่ลูกศรเอง) */
    /* ใส่ลูกศรใหม่ (Optional) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

/* ตัวเลือกข้างใน (Option) - Browser ส่วนใหญ่บังคับเป็นสีทึบ */
select.form-control option {
    background-color: rgba(255, 255, 255, 0.5) !important; /* พื้นหลังใส */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 12px !important;
    color: #1f2937 !important; /* สีตัวหนังสือเข้ม */
    font-weight: 500;
    cursor: pointer;
    appearance: none; /* ลบลูกศรเดิม (ถ้าต้องการใส่ลูกศรเอง) */
   
}


/* PAYMENT END */



/* =============================================
   iOS STYLE THEME (ORDERS PAGE)
   Clean, Modern, Frosted Glass
   ============================================= */

.glass-table-card {
    /* สีพื้นหลังขาวแบบโปร่งแสง */
    background: rgba(255, 255, 255, 0.25);
    /* เอฟเฟกต์เบลอพื้นหลังด้านหลัง (หัวใจสำคัญของ Glassmorphism) */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%); /* สำหรับ Safari */
    
    /* เพิ่มขอบขาวบางๆ ให้ดูเหมือนสันแก้ว */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* เพิ่มเงาฟุ้งๆ ให้ดูลอยขึ้นมา */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    border-radius: 25px; /* มุมโค้ง */
    padding: 30px; /* ระยะห่างภายใน */
}

/* 5. Table Styling (ตาราง) */
.glass-table {
    margin-bottom: 0;
}

.glass-table thead tr th {
    background-color: rgba(242, 242, 247, 0.5) !important; /* สีหัวตารางเทาจางๆ */
    color: #8e8e93 !important; /* ตัวหนังสือสีเทา (Label Color) */
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
    padding: 12px 15px;
}

.glass-table tbody tr td {
    background: transparent;
    color: #1c1c1e !important; /* สีดำ Main Text */
    font-size: 14px;
    padding: 14px 15px;
    border-top: 1px solid rgba(60, 60, 67, 0.1) !important; /* เส้นแบ่งบางๆ */
    vertical-align: middle;
}

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

/* Hover Row */
.glass-table tbody tr:hover {
    background-color: rgba(0, 122, 255, 0.05) !important; /* สีฟ้าจางๆ เวลาชี้ */
}

.link-wrapper, .glass-table a {
    color: #007aff !important; /* iOS System Blue */
    font-weight: 500;
}

/* ID Badge (Monospace gray) */
.glass-id-badge {
    background: transparent !important;
    border: none !important;
    color: #8e8e93 !important;
    font-family: "SF Mono", Menlo, monospace;
    font-size: 12px;
}

/* Status Badges (iOS Pills) */
.status-badge {
    padding: 4px 10px;
    border-radius: 6px; /* ไม่กลมดิก มีความเหลี่ยมเล็กน้อย */
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* สีสถานะแบบ iOS (Background อ่อน + Text เข้ม) */
.status-Completed { background-color: #d1fae5 !important; color: #059669 !important; }
.status-Pending { background-color: #ffedd5 !important; color: #c2410c !important; }
.status-Processing { background-color: #dbeafe !important; color: #1d4ed8 !important; }
.status-Inprogress { background-color: #e0f2fe !important; color: #0284c7 !important; }
.status-Canceled { background-color: #fee2e2 !important; color: #b91c1c !important; }
.status-Partial { background-color: #f3e8ff !important; color: #7e22ce !important; }



/* =============================================
   REFILL PAGE STYLING (CARD GRID)
   ============================================= */

.refill-grid-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* หัวตารางแบบ Grid (แสดงเฉพาะในจอคอม) */
.grid-header {
    display: grid;
    grid-template-columns: 150px 150px 1fr 150px; /* ID+Date | Order | Link | Status */
    padding: 0 25px;
    margin-bottom: 5px;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* การ์ดรายการ Refill แต่ละอัน */
.glass-refill-card {
    display: grid;
    grid-template-columns: 150px 150px 1fr 150px; /* Layout เหมือน Header */
    align-items: center;
    background: rgba(255, 255, 255, 0.7); /* ขาวขุ่น */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-refill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.9);
}

/* 1. ส่วน ID & Date */
.refill-meta {
    display: flex;
    flex-direction: column;
}
.refill-id {
    font-weight: 800;
    color: #374151;
    font-size: 1rem;
}
.refill-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* 2. ส่วน Order ID */
.order-link-badge {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.order-link-badge:hover {
    background: #2563eb;
    color: white;
}

/* 3. ส่วน Link */
.refill-link {
    padding-right: 20px;
    overflow: hidden;
}
.link-text {
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}
.service-name-small {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* 4. ส่วน Status */
.refill-status {
    text-align: right;
}

/* Responsive: มือถือ (แปลง Grid เป็น Card แนวตั้ง) */
@media (max-width: 992px) {
    .grid-header { display: none !important; }
    
    .glass-refill-card {
        grid-template-columns: 1fr; /* คอลัมน์เดียว */
        gap: 12px;
        padding: 20px;
    }
    
    .refill-meta {
        flex-direction: row;
        justify-content: space-between;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        padding-bottom: 10px;
        margin-bottom: 5px;
    }
    
    .refill-status {
        text-align: left; /* ชิดซ้ายในมือถือ */
        margin-top: 5px;
    }
    
    .label {
        font-weight: 600;
        color: #9ca3af;
        margin-right: 5px;
        font-size: 0.9rem;
    }
    
    .link-text { max-width: 100%; }
}

/* =====================================
   REFUND PAGE STYLING
   ===================================== */

/* ยอดเงินคืน (ให้เด่นชัด) */
.refund-amount {
    font-weight: 800;
    font-size: 1.1rem;
    color: #10b981 !important; /* สีเขียวสดใส */
    background: rgba(16, 185, 129, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* สถานะ Canceled/Partial */
.status-Canceled { background-color: #ef4444 !important; color: white !important; }
.status-Partial { background-color: #f59e0b !important; color: white !important; }

/* Alert Info ปรับให้สวย */
.alert-info.custom-alert {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1e40af;
    border-radius: 12px;
    padding: 15px;
    font-weight: 500;
}



/* =============================================
   API DOCS STYLING (FULL WIDTH & CLEAN)
   ============================================= */

/* 1. Layout & Sidebar */
.container-fluid.p-0 { padding: 0; }
.row.no-gutters { margin-right: 0; margin-left: 0; }
.row.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }
.bg-glass-sidebar {
    position: sticky;
    top: 80px; /* ให้ต่ำลงมาจาก Navbar */
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding-top: 20px;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.docs-sidebar-sticky {
    position: relative;
}

.sidebar-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 20px;
    padding-left: 15px;
    letter-spacing: 1px;
}

.doc-nav .nav-link {
    color: #4b5563;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 500;
    transition: all 0.2s;
}

.doc-nav .nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}
.doc-nav .nav-link.active {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* 2. Main Content Area (ขยายให้เต็ม) */
.docs-content-wrapper {
    padding: 40px 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.doc-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

/* 3. Glass Doc Card (การ์ดเนื้อหา) */
.glass-doc-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.main-intro-card {
    border-top: 5px solid #3b82f6; /* เพิ่มลูกเล่นให้การ์ดแรก */
}

.doc-title { font-weight: 800; color: #1f2937; }
.icon-circle {
    width: 60px; height: 60px;
    background: #eff6ff; color: #3b82f6;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}

/* 4. API Info Grid */
.api-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    background: rgba(255,255,255,0.5);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
}
.info-item { display: flex; flex-direction: column; }
.info-item.full-width { grid-column: span 2; }
.info-item .label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.endpoint-box {
    display: flex;
    align-items: center;
    background: #1f2937;
    border-radius: 10px;
    overflow: hidden;
}
.endpoint-url {
    background: transparent;
    color: #a5f3fc;
    padding: 12px 15px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    flex-grow: 1;
    word-break: break-all;
    margin: 0;
}
.btn-copy {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    padding: 0 15px;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-copy:hover { background: rgba(255,255,255,0.2); }

/* 5. API Key Box */
.api-key-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    padding: 25px;
    border-radius: 16px;
}
.key-display-wrapper {
    display: flex;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}
.key-display {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    color: #0369a1;
    font-weight: bold;
    padding: 12px 15px;
    flex-grow: 1;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-copy-key {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-copy-key:hover { background: #2563eb; }

/* 6. Method Section & Table */
.method-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 20px;
}
.method-title {
    font-weight: 800;
    color: #1f2937;
    margin: 0;
    font-size: 1.8rem;
}
.method-badge {
    background: #10b981;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.param-table th {
    font-weight: 700;
    color: #374151;
    background-color: rgba(243, 244, 246, 0.5) !important;
    border-bottom: 2px solid #e5e7eb !important;
    padding: 15px !important;
}
.param-table td {
    padding: 15px !important;
    vertical-align: top;
}
.param-code {
    color: #d946ef;
    background: rgba(217, 70, 239, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 7. Code Block (Dark Theme) */
.code-example-box {
    background: #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
  	margin-top: 30px;
}
.code-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 600;
}
.lang-tag {
    background: #3b82f6;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}
.code-content-wrapper { position: relative; }
.code-content {
  	background: #2d2d2d;
    padding: 25px;
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #a7f3d0;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 500px; /* จำกัดความสูงถ้ายาวเกิน */
}
.code-content-wrapper .btn-copy-code {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0; /* ซ่อนก่อน */
}
.btn-copy-code {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255,255,255,0.1);
    color: white; border: none;
    padding: 5px 10px; border-radius: 6px;
    opacity: 0.5; transition: 0.2s; cursor: pointer;
}
.code-content-wrapper:hover .btn-copy-code { opacity: 1; }
.btn-copy-code:hover { background: rgba(255,255,255,0.2); color: #fff; }

@media (max-width: 768px) {
    .bg-glass-sidebar { display: none; }
    .docs-content-wrapper { padding: 20px; }
    .api-info-grid { grid-template-columns: 1fr; }
    .info-item.full-width { grid-column: span 1; }
}



/* =============================================
   AFFILIATE DASHBOARD STYLING
   ============================================= */

/* 1. Referral Link Card */
.glass-affiliate-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.referral-box {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 5px;
    border: 1px solid #e2e8f0;
}
.referral-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: #334155;
    font-weight: 500;
    font-family: monospace;
    font-size: 1rem;
    outline: none;
}
.btn-copy-ref {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-copy-ref:hover { background: #2563eb; }

.border-left-glass {
    border-left: 1px solid rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .border-left-glass { border-left: none; border-top: 1px solid rgba(0,0,0,0.1); margin-top: 20px; padding-top: 20px; }
}

.commission-badge .rate {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
}
.commission-badge .label {
    color: #64748b;
    font-weight: 500;
}

/* 2. Stats Grid (4 Cards) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.8); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}
.icon-visits { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.icon-users { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-orders { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.icon-rate { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.85rem; color: #64748b; font-weight: 600; text-transform: uppercase; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: #1e293b; margin: 0; }

/* 3. Earnings Cards */
.glass-earnings-card {
    border-radius: 20px;
    padding: 25px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  	margin-top: 15px;
}
.total-bg {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}
.available-bg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.earning-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}
.earning-amount {
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 5px;
}

/* Grid Layout */
.blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Blog Card */
.glass-blog-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.9);
}

/* Image Thumbnail */
.blog-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
}
.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.glass-blog-card:hover .blog-thumb img {
    transform: scale(1.1);
}

/* Tags Badge */
.blog-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.tag-howto { background: #3b82f6; } /* Blue */
.tag-tips { background: #f59e0b; }  /* Orange */
.tag-review { background: #10b981; } /* Green */

/* Content Body */
.blog-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.4;
}
.blog-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}
.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    align-self: flex-start;
}
.read-more:hover { text-decoration: underline; }

/* ปุ่มดูทั้งหมดด้านบน */
.btn-glass-outline {
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #3b82f6;
    background: transparent;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-glass-outline:hover {
    background: #3b82f6;
    color: white;
}

/* =============================================
   CHILD PANEL STYLING
   ============================================= */

/* ไอคอนหัวข้อ */
.icon-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.2);
}

/* กล่องแจ้ง Nameserver */
.nameserver-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed #3b82f6;
    border-radius: 12px;
    padding: 20px;
}
.ns-header {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.ns-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ns-list li {
    font-family: monospace;
    font-size: 1rem;
    color: #334155;
    margin-bottom: 5px;
}

/* Input Group ที่มีไอคอนด้านหน้า */
.glass-input-group-text {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    overflow: hidden;
}
.glass-input-group-text .input-group-addon {
    padding: 0 15px;
    color: #64748b;
    background: transparent;
    border: none;
    font-size: 1.1rem;
}
.glass-input-group-text input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Info Card ด้านบน */
.glass-info-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.5);
    color: #334155;
}
.info-content {
    line-height: 1.6;
    font-size: 0.95rem;
}

.child-header-center {
    display: flex;
    flex-direction: column; /* เรียงจากบนลงล่าง */
    align-items: center;    /* จัดกึ่งกลางแนวนอน */
    justify-content: center;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* เส้นแบ่งจางๆ ด้านล่าง */
}

/* ปรับระยะห่างของไอคอนและตัวหนังสือ */
.child-header-center .icon-circle {
    margin-bottom: 15px !important;
}

.child-header-center h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #111827 !important; /* สีดำเข้ม */
}

.child-header-center p {
    font-size: 1rem;
    color: #6b7280;
}

/* =============================================
   MASS ORDER STYLING
   ============================================= */

/* Textarea ให้ดูเหมือน Code Editor */
.glass-textarea {
    background-color: rgba(30, 41, 59, 0.8) !important; /* พื้นหลังสีเข้ม (Dark Mode) */
    color: #e2e8f0 !important; /* ตัวหนังสือสีขาวนวล */
    font-family: 'Fira Code', 'Consolas', monospace; /* ฟอนต์แบบโค้ด */
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    line-height: 1.6;
    resize: vertical;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.glass-textarea::placeholder {
    color: #64748b !important;
    opacity: 0.7;
}

.glass-textarea:focus {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 2px 10px rgba(0,0,0,0.2) !important;
}

/* Badge คำแนะนำ */
.badge-info-soft {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ปรับแต่ง Alert ให้ดูดีขึ้น */
.custom-alert h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.glass-funds-card button[type="submit"],
button.btn-glass-submit {
    /* พื้นหลังสีฟ้าไล่ระดับ */
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    
    /* ตัวหนังสือสีขาว */
    color: #ffffff !important;
    
    /* ลบขอบ */
    border: none !important;
    
    /* ขนาดและรูปร่าง */
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    padding: 12px 30px !important;
    
    /* เงา */
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
    
    /* Animation Pulse (กระพริบ) */
    animation: pulse-blue 2s infinite;
    transition: all 0.3s ease !important;
}

/* 2. Effect ตอนเอาเมาส์ชี้ (Hover) */
.glass-funds-card button[type="submit"]:hover,
button.btn-glass-submit:hover {
    /* เปลี่ยนสีเข้มขึ้นนิดนึง */
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    
    /* ลอยขึ้น */
    transform: translateY(-3px);
    
    /* เงาฟุ้งขึ้น */
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6) !important;
    
    /* หยุดกระพริบตอนจะกด */
    animation: none;
}





/* =============================================
   UPDATES PAGE STYLING
   ============================================= */

.updates-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-header {
    display: grid;
    grid-template-columns: 40% 40% 20%;
    padding: 0 25px;
    color: #6b7280;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* การ์ดรายการอัปเดต */
.glass-update-card {
    display: grid;
    grid-template-columns: 40% 40% 20%;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}
.glass-update-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
}

/* ส่วนชื่อบริการ */
.update-service {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 20px;
}
.service-id-badge {
    background: #1f2937;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
}
.service-name-text {
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
}

/* ส่วนรายละเอียดการเปลี่ยนแปลง */
.update-detail {
    color: #4b5563;
    font-size: 0.95rem;
    padding-right: 15px;
}

/* วันที่ */
.date-badge {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ปุ่ม Filter */
.btn-glass-filter {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #374151;
    border-radius: 10px;
    padding: 8px 15px;
    font-weight: 500;
}
.glass-dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 10px;
}
.glass-dropdown-menu li a {
    padding: 8px 15px;
    border-radius: 8px;
    color: #4b5563;
}
.glass-dropdown-menu li.active a,
.glass-dropdown-menu li a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

/* Responsive Mobile */
@media (max-width: 992px) {
    .timeline-header { display: none; }
    
    .glass-update-card {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .update-service {
        padding-right: 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        padding-bottom: 10px;
        margin-bottom: 5px;
    }
    
    .update-date {
        text-align: left !important;
        margin-top: 5px;
    }
}

/* =============================================
   BLOG PAGE STYLING
   ============================================= */

/* Grid Layout (3 Columns) */
.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
}
/* ซ่อน Pagination ทิ้งไปเลย เพราะเราโหลดมาโชว์หมดแล้ว */
.glass-pagination-wrapper {
    display: none !important;
}
/* Blog Card */
.glass-blog-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.glass-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

/* Image Wrapper */
.blog-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.glass-blog-card:hover .blog-img {
    transform: scale(1.1); /* Zoom effect */
}

/* Placeholder BG (กรณีไม่มีรูป) */
.placeholder-bg {
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay Button */
.blog-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.glass-blog-card:hover .blog-overlay { opacity: 1; }

/* Content */
.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}
.blog-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}
.blog-title a:hover { color: #3b82f6; }

.blog-excerpt {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
    text-align: right;
}
.read-more-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
}
.read-more-link:hover { text-decoration: underline; }

/* Blog Detail Page */
.blog-detail-card {
    padding: 40px;
    line-height: 1.8;
    color: #374151;
}
.blog-detail-card img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}
.blog-body-content h1, .blog-body-content h2, .blog-body-content h3 {
    color: #1f2937;
    font-weight: 700;
    margin-top: 30px;
}
/* =============================================
   SINGLE BLOG POST STYLING
   ============================================= */

/* ปุ่มย้อนกลับ */
.btn-glass-back {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #4b5563;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.btn-glass-back:hover {
    background: white;
    color: #3b82f6;
    transform: translateX(-5px); /* ขยับซ้ายนิดนึง */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* กล่องบทความ */
.glass-blog-detail-card {
    background: rgba(255, 255, 255, 0.7); /* พื้นหลังแก้ว */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-bottom: 50px;
}

/* รูปภาพ */
.blog-featured-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* หัวข้อ */
.blog-detail-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* เส้นแบ่ง */
.blog-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(0,0,0,0.1), rgba(0,0,0,0));
    margin: 20px 0 30px 0;
}

/* เนื้อหา */
.blog-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151; /* สีเทาเข้มอ่านสบายตา */
}

/* จัดการ Element ภายในเนื้อหาให้สวยงาม */
.blog-detail-content p { margin-bottom: 20px; }
.blog-detail-content h2 { font-size: 1.8rem; font-weight: 700; color: #111827; margin-top: 40px; margin-bottom: 15px; }
.blog-detail-content h3 { font-size: 1.5rem; font-weight: 600; color: #1f2937; margin-top: 30px; margin-bottom: 10px; }
.blog-detail-content ul, .blog-detail-content ol { margin-bottom: 20px; padding-left: 20px; }
.blog-detail-content li { margin-bottom: 10px; }
.blog-detail-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.blog-detail-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #4b5563;
    background: rgba(59, 130, 246, 0.05);
    padding: 15px;
    border-radius: 0 10px 10px 0;
}


.glass-description-box-child {
  background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}
  
}



.badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #ef4444; /* สีแดง */
    border-radius: 50%;
    border: 2px solid #fff;
    display: none; /* ซ่อนไว้ก่อน */
    z-index: 10;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}



/* =============================================
   FIX TEXTAREA FOCUS STYLE
   ปรับแต่งช่องพิมพ์ข้อความตอนกดใช้งาน
   ============================================= */

/* เป้าหมายคือ Textarea ทุกตัวในหน้าเว็บ */
textarea.form-control,
.glass-textarea {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    color: #000 !important; /* ตัวหนังสือสีดำ */
    border-radius: 12px !important;
    padding: 15px !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
  	font-family: var(--font-main);
}

/* ตอนคลิกพิมพ์ (Focus State) */
textarea.form-control:focus,
.glass-textarea:focus {
    /* พื้นหลังสว่างขึ้นเกือบขาว */
    background-color: rgba(255, 255, 255, 0.9) !important;
    
    /* ขอบสีฟ้า */
    border-color: #3b82f6 !important;
    
    /* เงาฟุ้งสีฟ้า (Glow) */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
    
    /* ลบเส้นขอบเดิมของ Browser */
    outline: none !important;
  font-family: var(--font-main);
}

/* ปรับสี Placeholder (ข้อความจางๆ) */
textarea.form-control::placeholder,
.glass-textarea::placeholder {
    color: #6b7280 !important;
    opacity: 0.8;
  font-family: var(--font-main);
}
/* =============================================
   TICKET CARD LIST STYLE
   ============================================= */
/* 1. ส่วน Hero ตรงกลาง */
.ticket-hero-section {
    position: relative;
    z-index: 2;
}

/* Tag เล็กๆ ด้านบน */
.badge-pill-soft {
    display: inline-block;
    background-color: rgba(219, 234, 254, 0.8); /* สีฟ้าอ่อน */
    color: #2563eb;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.5);
}

/* หัวข้อใหญ่ไล่สี (Gradient Text) */
.ticket-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 15px 0;
    /* ไล่สีจากน้ำเงินไปชมพู */
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    line-height: 1.2;
}


/* คำอธิบายรอง */
.ticket-hero-subtitle {
    font-size: 1.1rem;
    color: #4b5563;
    font-weight: 500;
}

/* 2. Toolbar (ค้นหา & ปุ่ม) */
.ticket-toolbar {
    padding: 0 10px;
}

/* ช่องค้นหาแบบคลีน (Clean Search) */
.clean-search-wrapper {
    background: #ffffff;
    width: 100%;             /* ยืดหยุ่นตามหน้าจอ */
    max-width: 500px;        /* แต่ไม่เกิน 500px (ให้ยาวกว่าเดิม) */
    height: 40px;            /* ความสูงมาตรฐาน (ให้เท่ากับปุ่มหรือใหญ่กว่านิดนึง) */
    border-radius: 50px;     /* ทรงแคปซูล (Pill Shape) */
    display: flex;
    align-items: center;
    justify-self: center;
    justify-content: center;
  	padding-top:15px
    padding: 0 10px;         /* ระยะขอบใน */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* เงานุ่มๆ */
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
  	
}
.clean-search-wrapper:focus-within {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15); /* เงาสีฟ้าฟุ้ง */
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.btn-search-icon {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.2rem;
    padding: 0 15px;
    cursor: pointer;
    transition: color 0.2s;
}
.clean-search-wrapper:focus-within .btn-search-icon {
    color: #3b82f6; /* เปลี่ยนเป็นสีฟ้าตอนพิมพ์ */
}

.search-icon {
    color: #9ca3af;
    font-size: 1.1rem;
    margin-right: 15px;
}

.clean-search-input {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 1rem;
    color: #1f2937;
    outline: none;
}
.clean-search-input::placeholder {
    color: #9ca3af;
}

/* ปุ่มสร้างใหม่แบบคลีน (Clean Button) */
.btn-clean-create {
    background: transparent;
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.btn-clean-create:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}
.btn-clean-create i {
    font-size: 0.9rem;
    color: #333;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 768px) {
    .ticket-hero-title { font-size: 2rem; }
    .ticket-toolbar { flex-direction: column-reverse; gap: 15px; }
    .clean-search-wrapper { width: 100%; }
    .btn-clean-create { width: 100%; justify-content: center; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
}
.ticket-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glass-ticket-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.glass-ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

/* Header */
.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ticket-id-badge {
    font-family: monospace;
    background: #e2e8f0;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
}

/* Body (Title) */
.ticket-title-link {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.2s;
}
.ticket-title-link:hover {
    color: #3b82f6;
    text-decoration: none;
}

/* Footer (Meta Info) */
.ticket-card-footer {
    font-size: 0.9rem;
    color: #64748b;
    border-top: 1px dashed rgba(0,0,0,0.1);
    padding-top: 15px;
    margin-top: 15px;
}

/* ปุ่มดูรายละเอียด */
.btn-glass-outline {
    border: 1px solid #cbd5e1;
    color: #475569;
    background: transparent;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-glass-outline:hover {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

/* Background Icon Decoration */
.ticket-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 6rem;
    color: rgba(0,0,0,0.03);
    transform: rotate(-15deg);
    pointer-events: none;
}

/* Status Colors (ปรับให้เหมือนรูป) */
.status-Pending { background-color: #fef3c7; color: #d97706; } /* เหลืองส้ม */
.status-Answered { background-color: #dbeafe; color: #2563eb; } /* ฟ้า */
.status-Closed { background-color: #e2e8f0; color: #475569; } /* เทา */

.border-left-primary {
    border-left: 4px solid #3b82f6;
    padding-left: 15px;
}
/* =============================================
   GLASS CHAT UI STYLE
   ============================================= */

/* กล่องแชทหลัก */
.glass-chat-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 75vh; /* ความสูงของกล่องแชท */
}

/* พื้นที่แสดงประวัติแชท */
.chat-history-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px;
    background: rgba(255, 255, 255, 0.3);
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.chat-history-box::-webkit-scrollbar { width: 6px; }
.chat-history-box::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }

/* Message Bubble Common */
.chat-message {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-end;
}
.message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.message-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 5px;
    margin-left: 5px;
    margin-right: 5px;
}

/* 1. ฝั่งเรา (Right / User) */
.message-right {
    justify-content: flex-end;
    flex-direction: column;
    align-items: flex-end;
}
.user-bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-bottom-right-radius: 4px; /* มุมแหลมฝั่งขวา */
}
.user-bubble a { color: #e0f2fe; text-decoration: underline; }

/* 2. ฝั่งแอดมิน (Left / Support) */
.message-left {
    justify-content: flex-start;
}
.admin-avatar {
    width: 35px;
    height: 35px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.admin-bubble {
    background: #ffffff;
    color: #374151;
    border-bottom-left-radius: 4px; /* มุมแหลมฝั่งซ้าย */
}

/* File Attachment */
.file-attachment {
    display: inline-block;
    background: rgba(0,0,0,0.1);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: inherit;
    text-decoration: none !important;
    transition: background 0.2s;
}
.file-attachment:hover { background: rgba(0,0,0,0.2); }
.user-bubble .file-attachment { background: rgba(255,255,255,0.2); }
.user-bubble .file-attachment:hover { background: rgba(255,255,255,0.3); }

/* Footer Form */
.chat-footer {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ปรับแต่งปุ่มแนบไฟล์ให้สวยขึ้น */
.fileinput-button {
    background: transparent !important;
    border: 1px dashed #cbd5e1 !important;
    color: #64748b !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 0.9rem !important;
}
.fileinput-button:hover {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

/* =============================================
   PAYMENT METHOD GRID (CARD SELECTION)
   ============================================= */

.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* ปรับขนาดอัตโนมัติ */
    gap: 15px;
    margin-bottom: 20px;
}

.payment-card {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Hover Effect */
.payment-card:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Active State (เมื่อเลือก) */
.payment-card.active {
    background: #eff6ff; /* สีฟ้าจางๆ */
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.payment-icon {
    font-size: 2rem;
    color: #64748b;
    margin-bottom: 10px;
    transition: color 0.2s;
}
.payment-card.active .payment-icon {
    color: #3b82f6;
}

.payment-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}
.payment-card.active .payment-name {
    color: #1e40af;
}

/* ไอคอนติ๊กถูกมุมขวาบน (ซ่อนไว้ก่อน) */
.check-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #3b82f6;
    font-size: 1.2rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}
.payment-card.active .check-icon {
    opacity: 1;
    transform: scale(1);
}


/* =============================================
   RESPONSIVE FONT SIZE (LARGE SCREENS)
   ปรับขนาดตัวอักษรให้ใหญ่ขึ้นสำหรับจอใหญ่ (> 1080p)
   ============================================= */



/* สำหรับหน้าจอที่กว้างกว่า 1920px (จอ 2K / 4K) */
@media (min-width: 1921px) {
    html {
        font-size: 18px; /* เพิ่มเป็น 18px (ใหญ่ขึ้นอีก 12.5%) */
    }

    /* ขยาย Sidebar อีก */
    .glass-sidebar {
        width: 340px;
        padding: 35px;
    }
    .dashboard-content {
        margin-left: 340px;
        width: calc(100% - 340px);
        padding: 60px;
    }

    /* ปรับขนาดไอคอนและหัวข้อ */
    .sidebar-brand { font-size: 2.2rem; }
    .page-title { font-size: 2.5rem; }
    
    /* เพิ่มความสูงบรรทัดให้อ่านง่าย */
    body {
        line-height: 1.7;
    }
}
/* =============================================
   FIX CLICKABLE ISSUES (Z-INDEX)
   ============================================= */
@keyframes pointLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.floating-icon {
    animation: pointLeft 1.5s infinite ease-in-out;
}
/* ดันการ์ดเลือกจ่ายเงินให้ลอยขึ้น */
.payment-card {
    position: relative;
    z-index: 10 !important; /* สำคัญ: ให้ลอยเหนือพื้นหลัง */
    cursor: pointer;
}

/* ดันปุ่มเลือกราคาให้ลอยขึ้น */
.amount-pill {
    position: relative;
    z-index: 10 !important;
    cursor: pointer;
}

/* ดันปุ่ม Pay */
#paymentSubmitBtn {
    position: relative;
    z-index: 10 !important;
}

/* แก้ไข Select Box ที่ซ่อนให้แน่ใจว่าไม่บังเพื่อน */
.hidden-select {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

/* =============================================
   FIXED TOOLTIP (JS BASED)
   กล่องข้อความลอยเหนือทุกเลเยอร์
   ============================================= */

.custom-fixed-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.85); /* สีดำโปร่งแสง */
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 999999; /* อยู่บนสุดของจักรวาล */
    pointer-events: none; /* ให้เมาส์คลิกทะลุได้ */
    display: none; /* ซ่อนไว้ก่อน */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    transform: translate(15px, 15px); /* ขยับห่างจากเมาส์นิดนึง */
    max-width: max-content;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payment-logo-img {
    height: 60px; /* ความสูงของโลโก้ */
    width: auto;  /* ความกว้างปรับตามสัดส่วน */
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* เงาเล็กน้อย */
    margin-bottom: 5px;
}

/* ปรับ container ไอคอนเดิมให้รองรับรูปภาพ */
.payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px; /* จองพื้นที่ความสูง */
}

/* =============================================
   TERMS PAGE STYLING
   ============================================= */

/* พื้นหลังไอคอน Header */
.bg-primary-soft {
    background-color: rgba(59, 130, 246, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 15px auto;
}

/* กล่องเอกสาร (Glass Paper) */
.glass-doc-card {
    background: #ffffff !important; /* สีขาวทึบเพื่อให้อ่านง่าย */
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    position: relative;
}

/* จัดรูปแบบเนื้อหาที่มาจาก Backend (Dynamic Content) */
.terms-body-dynamic {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
}
.terms-body-dynamic h1, 
.terms-body-dynamic h2, 
.terms-body-dynamic h3, 
.terms-body-dynamic h4 {
    color: #1e3a8a;
    font-weight: 800;
    margin-top: 30px;
    margin-bottom: 15px;
}
.terms-body-dynamic ul, 
.terms-body-dynamic ol {
    padding-left: 20px;
    margin-bottom: 20px;
}
.terms-body-dynamic li {
    margin-bottom: 10px;
}
.terms-body-dynamic strong {
    color: #000;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .glass-doc-card {
        padding: 25px;
    }
}

/* ... CSS เดิมของคุณ ... */

.dashboard-grid {
    display: grid;
    grid-template-columns: 3.5fr 1fr 1fr; 
    gap: 20px;
    /* เพิ่ม transition ตรงนี้เพื่อให้การยืดหดนุ่มนวล */
    transition: grid-template-columns 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* สถานะ: เมื่อเลือกหมวดหมู่แล้ว (ซ้ายเล็ก กลางใหญ่) */
.mode-selected {
    grid-template-columns: 0.8fr 1.6fr 1fr;
}

/* ---------------------------------------------------- */
/* [เพิ่มใหม่] สั่งให้ขยายกลับมา เมื่อ Hover ที่ช่องซ้าย */
/* ---------------------------------------------------- */

/* แปลว่า: ถ้า .dashboard-grid มีคลาส .mode-selected อยู่ 
   แต่เมาส์กำลังชี้ไปที่ลูกชื่อ .col-category ให้เปลี่ยน Grid กลับเป็นค่าเริ่มต้น */
.dashboard-grid.mode-selected:has(.col-category:hover) {
    grid-template-columns: 3.5fr 1fr 1fr; /* ค่าเดียวกับตอนเริ่มต้น (ซ้ายใหญ่) */
}