@charset "UTF-8";

/* -------------------------------
   1. Reset พื้นฐาน
-------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
    transition:.2s;
}


/* thai */
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/notosansthai/v25/iJWQBXeUZi_OHPqn4wq6hQ2_hbJ1xyN9wd43SofNWcdfKI2hTWsb-P2c.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* latin-ext */
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/notosansthai/v25/iJWQBXeUZi_OHPqn4wq6hQ2_hbJ1xyN9wd43SofNWcdfMo2hTWsb-P2c.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/notosansthai/v25/iJWQBXeUZi_OHPqn4wq6hQ2_hbJ1xyN9wd43SofNWcdfPI2hTWsb-A.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
html, body {
  touch-action: manipulation;
  overscroll-behavior: contain;
}
  html {
    scroll-behavior: smooth;
  }
  
  body {
      padding: 20px;
      margin: 0;
      padding: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
    }
    
body,button, input, select, textarea {
  font-family: 'Noto Sans Thai', sans-serif !important;
}

button, select, input, textarea {
  color: inherit; /* 🛡️ ป้องกัน iOS เปลี่ยนสีปุ่ม */
  text-decoration: none; /* 🛡️ ป้องกันใส่เส้นลิงก์ */
}

a {
  text-decoration: none;
}

    h1,h2,h3,h4,h5,h6{
      font-weight: 500;
      margin:0;
    }

    .moneybet {
  display: flex;
  gap: 10px;
  padding: 5px;
  background: #f9fafb;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 10px auto;
  width: 100%;
  max-width: 400px;
  align-items: center;
}

.moneybet label {
  font-size: 16px;
  color: #6b4e12; /* สีตัวหนังสือแบบในภาพ */
}

.amount-control {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  width: 65%;
}

.amount-control button {
  width: 20%;
  height: 40px;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
@media (max-width:500px){
  .amount-control button {
  height: 34px;
  }
}

.amount-control .btn-decrease {
  background: #e74c3c; /* สีแดง */
}

.amount-control .btn-increase {
  background: #2ecc71; /* สีเขียว */
}

.amount-control input[type="number"] {
  width: 70px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 18px;
  outline: none;
}

@media (max-width:450px){
  h3.selecttype{
  font-size: 3vw;
  margin-bottom: 1px;
}
}

    .section {
      padding: 10px;
    }
div#lockedFullSection {
    font-size: 13px;
}
    .number-box {
      width: 40px;
      height: 40px;
      font-size: 20px;
      text-align: center;
      margin: 5px;
    }
@media (max-width:500px){
  .number-box {
      width: 35px;
      height: 35px;
    margin: 3px;
    }
}
    .keypad button {
      width: 100%;
      height: 40px;
      margin: 3px;
      font-size: 20px;
      border-radius: 10px;
      border: honeydew;
      cursor: pointer;
    }
.keypad button[onclick="clearDigits()"]{
  background: #ffc2c2;
  color: #9a0000;
  font-size: 16px;
}
    .keypad {
      margin-top: 10px;
    }
   .bet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px;
  border-bottom: 1px solid #ccc;
  font-size: 12px;
}

    .active-tab {
      background-color: #222;
      color: white;
      font-weight: bold;
      border-radius: 5px;
    }
    .tab-btn {
      margin-right: 5px;
      padding: 5px 10px;
    }
    .tab-btn.hide{
      display: none;
    }
    #bet-types label {
  display: flex;
  align-items: center;
  background-color: #f0f0f0;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  width: max-content;
  padding: 2px 6px;
  font-weight: 400 !important;
  font-size: 16px;
}
@media (max-width:1024px){
  #bet-types label {
  font-size: 14px;
  width: 100%;
}
}

@media (max-width:674px){
  #bet-types label {
  font-size: 12px;
  padding: 2px 3px;
}
}


.main-content {
    width: 100%;
    padding: 10px;
    margin: 0 auto;
    margin-bottom: 10px;
}
/* à¸‹à¹ˆà¸­à¸™ checkbox */
#bet-types input[type="checkbox"] {
  display: none;
}

/* à¹„à¸­à¸„à¸­à¸™ + à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™ */
#bet-types .icon::before {
  content: '+';
  display: inline-block;
  margin-right: 10px;
  font-weight: bold;
  font-size: 18px;
  color: #666;
}

/* à¹€à¸¡à¸·à¹ˆà¸­ checkbox à¸–à¸¹à¸à¹€à¸¥à¸·à¸­à¸ â†’ à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¸ªà¸µ label + à¹„à¸­à¸„à¸­à¸™ */
#bet-types label:has(input:checked) {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}

#bet-types label:has(input:checked) .icon::before {
  content: '✓';
  color: white;
}

div.toggleLotteryTypeBox {
    text-align: center;
}
span.selectedLotteryName p {
    font-weight: 400;
    font-size: 13px;
    margin-top: -4px;
}
.selectedLotteryName{
  display: block;
}
@media (max-width:1024px){
  .selectedLotteryName{
  text-align: right;
}
}
.selectedLotteryName img{
  width: 30px;
  height:auto;
  vertical-align:middle;
  margin-right:6px;
}
.tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  justify-content: center;
}
@media (max-width:674px){
   .selectedLotteryName{
  font-size:3.5vw;
}
  span.selectedLotteryName p {
   font-size: 2.7vw;
}
  .tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
}
div.toggleLotteryTypeBox {
    background: white;
    margin: 0 auto;
    border-radius: 10px;
    width: 100%;
    max-width: 1140px;
    padding: 0;
    text-align: left;
    display:none;
    font-size: 25px;
}
@media (max-width:1024px){
  div.toggleLotteryTypeBox {
    display:block;
}
}

.tab-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: #f2f2f2;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

.tab-label {
  padding: 0px 10px;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.tab-rate {
  color: #000;
  padding: 0;
  font-size: 13px;
  text-align: center;
  min-width: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width:767px){
  .tab-bar{
    gap:4px;
  }
.tab-label {
  width:50px;
  font-size:12px;
  padding: 0px 5px;
  min-height: 31.5px;
}
  .tab-rate {
    font-size: 13px;
  }
}

@media (max-width:450px){
  .tab-rate {
     font-size: 2.5vw;
}
}
.tab-rate small {
  opacity: 0.7;
}

.tab-item:nth-child(1) .tab-label {
  background: var(--danger-color); /* à¹€à¸‚à¸µà¸¢à¸§ 2 à¸•à¸±à¸§ */
}

.tab-item:nth-child(2) .tab-label {
  background: var(--danger-color); /* à¹à¸”à¸‡ 3 à¸•à¸±à¸§ */
}

.tab-item:nth-child(3) .tab-label,
.tab-item:nth-child(4) .tab-label {
  background: var(--danger-color); /* à¸™à¹‰à¸³à¹€à¸‡à¸´à¸™ 4 à¸•à¸±à¸§ & à¸§à¸´à¹ˆà¸‡ */
}

/* Active à¹€à¸›à¹‡à¸™à¹€à¸‚à¸µà¸¢à¸§à¹€à¸ªà¸¡à¸­ */
.tab-item.active .tab-label {
  background: var(--success-color);
}

.tab-item.active {
  border-color: var(--success-color);
  box-shadow: 0 0 5px var(--success-color);
  transition: all .2s;
  transform: scale(1.05);
}


/* ✅ Fixed Top Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #333;
  padding: 5px 10px;
  height: auto;
  min-height: 50px;
  max-height: 100px;
}

.navbar img {
  max-height: 100px;
  height: auto;
}

.navbar .nav-left,
.navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 0;
}

.navbar .nav-right {
  position: absolute;
  right: 5px;
}

.logo {
  max-height: 90px;
}

.nav-link {
  text-decoration: none !important;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
}
.nav-link {
  text-decoration: none !important;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  padding: 10px 5px;
  border-radius: 5px;
}
.nav-link:hover,.nav-link.active {
  background: #ffffff1a;
  text-decoration: underline;
}
.nav-link .icon-svg{
  width:20px;
}
#sidebarMenu .nav-link .icon-svg {
    width: 30px;
  margin-right:10px;
  
}

.nav-credit {
  font-weight: bold;
  font-size: 14px;
  font-weight: 400;
  background: #00000024;
  padding: 2px 7px 2px 30px;
  border-radius: 20px;
}

img.img-fluid.-ic-coin {
  margin-right: -27px;
  z-index: 1;
  width: 29px;
  height: auto;
}

.nav-user {
  margin-left: 7px;
}

button#refreshCreditBtn {}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 5px;
  margin-left: 10px;
}

/* ✅ Fixed Top Navbar */



/* ✅ Sidebar and Overlay */
.sidebar {
  position: fixed;
  top: 0;
  left: -220px;
  width: 200px;
  height: 100%;
  background-color: var(--dark-color);
  padding: 20px 0; /* leave space for navbar */
  flex-direction: column;
  gap: 10px;
  transition: left 0.3s ease;
  z-index: 1100;
}

.sidebar.show {
  left: 0;
}

.sidebar a {
  color: white;
  text-decoration: none;
  padding: 12px 12px;
  display: block;
  border-radius: 4px;
  display: flex;
}

.sidebar a:hover {
  background: #444;
}

/* ✅ Overlay */
#sidebarOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1090;
  display: none;
}

#sidebarOverlay.active {
  display: block;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .navbar-toggle {
    display: inline-block;
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

.section.allsection.pinhuay {padding: 0;}
.d-flex,#lottery-type-list{
  display: flex;
}
#popup-box{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgb(255, 255, 255);
  padding:20px;
  border: 1px solid rgb(204, 204, 204);
  max-height: 80vh;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px;
  width: auto;
}
@media (max-width:991px){
  #popup-box{

  width: 90%;
}
}
.popuptable td{

  padding: 6px;
}

    .filters {
      margin-bottom: 20px;
      background: #f1f1f1;
      padding: 10px;
      border-radius: 6px;
    }
    .filters label {
      margin-right: 10px;
    }

    .tab-item.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.tab-switch button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background: #eee;
  border-radius: 8px;
  cursor: pointer;
}
.tab-switch button.active {
  background: #333;
  color: #fff;
}
.wallet-form {
  margin: auto;
  width: 90%;
}
.bank-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 6px;
}
.bank-item:hover {
  background: #f0f0f0;
}


.wallet-tabs button {
  padding: 8px 16px;
  margin-right: 5px;
  border: none;
  background: #eee;
  cursor: pointer;
}
.wallet-tabs .active {
  background: #00bcd4;
  color: white;
  font-weight: bold;
}
.bank-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bank-card {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
}
.wallet-box .bank-item.active {
  background: #e6ffe6;
  border: 1px solid #4caf50;
}

.wallet-box .check-icon {
  margin-left: auto;
  font-size: 18px;
  color: green;
}


.wallet-box {
  padding: 20px !important;
  max-width: 991px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.wallet-box h2 {
  text-align: center;
}

.wallet-box .tab-switch {
  display: flex;
  gap: 10px;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 25%;
  background: #ffffff;
  padding: 10px;
  border-radius: 10px;
  justify-content: flex-start;
  box-shadow: 0 0 12px rgb(0 0 0 / 14%);
}

.wallet-box .tab-switch button {
  padding: 13px 10px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 400;
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: flex-start;
  font-size: 14px;
}

.wallet-box .tab-switch button.active {
  background: var(--info-color);
  color: #fff;
}

.wallet-box .wallet-form {
  display: block;
}
img.icon-svg {
    width: 30px;
    margin-right: 10px;
}
.wallet-box label {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  margin-top: 10px;
}

.wallet-box input[type="number"],
.wallet-box input[type="datetime-local"],
.wallet-box input[type="file"] {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.wallet-box button[type="submit"] {
  padding: 10px 20px;
  background: var(--success-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  display: block;
  margin-top: 15px;
}
div#withdrawForm button[type="submit"] {
    background: var(--danger-color);
}
.wallet-box button[type="submit"]:hover {
  filter:brightness(1.1);
}

.wallet-box .bank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #ddd;
}

.wallet-box .bank-item:hover {
  background: #eef5ff;
}

.wallet-box .bank-item img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.wallet-box .bank-item div {
  font-size: 14px;
  line-height: 1.4;
}

.wallet-box #walletHistoryList {
  margin-top: 10px;
}
span.timespanhistory {
    font-size: 13px;
    display: block;
}

.wallet-box #walletHistoryList table {
  width: 100%;
  border-collapse: collapse;
}

.wallet-box #walletHistoryList th,
.wallet-box #walletHistoryList td {
  padding: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  text-align: center;
}

.wallet-box #walletHistoryList tr:nth-child(even) {
  background-color: #f2f2f2;
}


.withdrawBox {
  display: none;
}

 #lottery-type-list input[type="radio"] {
    display: none;
  }
  #lottery-type-list input[type="radio"]:disabled + span {
  opacity: 0.5;
  pointer-events: none;
}

#lottery-type-list {
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f9f9f9;
  justify-content: space-evenly;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

#lottery-type-list label {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 10px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: background 0.2s ease, border 0.2s ease;
}

#lottery-type-list label:hover {
  background: #f0f8ff;
  border-color: #007bff;
}

#lottery-type-list input[type="radio"] {
  transform: scale(1.1);
  cursor: pointer;
}

#lottery-type-list span {
  font-size: 13px;
  color: #666;
  display: block;
  color: gray;
}

@media screen and (max-width: 600px) {
  #lottery-type-list {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }

  #lottery-type-list label {
  font-size: 4vw;
  }
}


.pagination button {
  padding: 5px 12px;
  margin: 2px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}

.pagination button:hover {
  background: #e0e0e0;
}
.disabled-tab {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.main-content.tickets_all {
    width: 100%;
    max-width: 1140px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

#lottery-type-list label.active {
  background: #cef7ff;
  border-left: 4px solid #00acc1;
  padding-left: 8px;
  border-radius: 4px;
}


.BoxSelectType {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
}

.toggleLotteryTypeBox button {
  border: none;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  background: #eaeaea;
  height: 30px;
  font-size: 12px;
}
.toggleLotteryTypeBox button:hover{
  filter:brightness(1.1);
}
.row.col-key {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    margin: 0 auto;
    align-content: center;
    justify-content: center;
    gap: 10px;
}
.colyourtickets {
  width: 350px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 0 10px #00000029;
  background: linear-gradient(93deg, #ffffff, #e4e4e4);
  padding: 5px 10px;
}
@media (max-width:767px){
  .colyourtickets {
  width: 40%;
  border-radius: 10px;
  font-size: 13px;
  padding: 5px;
}
}
div#bet-types {
    display: flex;
    flex-direction: row;
    padding: 5px 0;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 10px;
  }
@media (max-width:1024px){
  div#bet-types {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }
}
@media (max-width:500px){
  div#bet-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
}
  .main-content.dashboard .section {
    padding: 0;

}
.colkeys {
    width: 40vw;
    text-align: center;}.boxofnumberbox {
    text-align: center;}.colkeys .section:nth-child(1) {
    background: #ffffff30;};
}

div#betList button {
    border: none;
    padding: 5px 0;
    background: none;
}

.user-menu {
  position: absolute;
  right: 10px;
  top: 40px;
  padding: 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  z-index: 999;
  width: max-content;
  min-width: 140px;
}
.user-menu a {
  padding: 5px;
  text-decoration: none;
}
.user-menu.hidden {
  display: none;
}




#profileBox {
  position: fixed;
  z-index: 9999;
  background: #ffffff00;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  padding: 20px 25px;
  width: 100%;
  transition: all 0.3s ease;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
}

#profileBox.hidden {
  display: none;
}

#profileBox .modal-content {
  display: flex;
  flex-direction: column;
}

#profileBox h3,
#profileBox h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  margin-top: 10px;
}

#profileBox table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
  font-size: 14px;
}

#profileBox table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

#profileBox input[type="password"] {
  padding: 6px 10px;
  font-size: 14px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

#profileBox button {
  margin-top: 5px;
  padding: 6px 10px;
  background-color: #007bff;
  color: white;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#profileBox button:hover {
  background-color: #0056b3;
}

#profileBox button + button {
  background-color: #6c757d;
}

#profileBox button + button:hover {
  background-color: #5a6268;
}

.keypad div {
    display: flex;
}

.colkeys {
    width: 100%;
    text-align: center;
    padding: 10px 0;
}
@media (max-width:767px){
  .colkeys {
    width: 60%;
    padding: 0;
}
}
.boxofnumberbox {
    text-align: center;
  font-size:16px;
}
@media (max-width:599px){
 .boxofnumberbox {
    text-align: center;
  font-size:2.5vw;
}
}
.colkeys .section:nth-child(1) {
    background: #ffffff30;
}


.boxgridph {
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
    max-width: 1299px;
    margin: 0 auto;
    gap: 10px;
    align-items: flex-start;
}
@media (max-width:1024px){
  .boxgridph {
    display: flex;
    flex-direction: column;
}
}
.inboxgridph {
    width: 70%;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    position: sticky;
    top: 10px;
}

.boxgridph .inboxgridph:nth-child(2) {
    width: 30%;
}
@media (max-width:1024px){
  .inboxgridph {
    width: 80%;
    border-radius: 10px;
    position: relative;
    top: 0;
}
  .inboxgridph {
    width: 100%;
    border-radius: 0;
    top: 0 !important;
}
  .boxgridph .inboxgridph:nth-child(2) {
    width: 100%;
    text-align: center;
}
}
div#rateList {
    font-size: 13px;
}
div#BoxSelectType {
    width: 1140px;
    margin: 0 auto;
    max-width: 100%;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.inboxgridph:nth-child(1) {
    display: flex;
}
@media (max-width:470px){
  .inboxgridph:nth-child(1) {
    display: flex;
    padding: 5px;
    padding-bottom: 10px;
}
}
#selectedLotteryName {
  font-size: 30px;
  display: block;
}
.boxnumberinsert {
    font-size: 10px;
}

.boxnumberinsert button {
    padding: 2px 6px;
    border-radius: 10px;
    border: none;
    background: #e7e7e7;
    color: #000000;
    margin: 0px;
    cursor: pointer;
    font-size: 15px;
    margin: 4px;
}
.boxnumberinsert button:hover{
}

#betList {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 600px;
  overflow: auto;
  padding: 0px 3px;
}
@media (max-width:1024px){
  #betList {
  max-height: 640px;
}
}
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: transparent;
    border-radius: 0;
}
::-webkit-scrollbar-thumb {
    border-radius: 0;
    background-color: #b0b4bb;
}
::-webkit-scrollbar-track {
    background: #e6e8ec;
    width: 6px;
    height: 6px;
    border-radius: 0;
}

.bet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 5px;
  flex-wrap: wrap;
  background-color: #fafafa;
}


.bet-info {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  padding-right: 5px;
}

@media (max-width:550px){
.bet-item  {
  display:block;
}
}

.bet-number {
  font-weight: bold;
  font-size: 16px;
}

.bet-details {
  color: #666;
  font-size: 11px;
}

.bet-amount {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.bet-amount button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: red;
}

@media (max-width: 550px) {
  .bet-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .bet-amount {
    justify-content: space-between;
    width: 100%;
    margin-top: 0px;
  }
}


.bet-action-buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-direction: row;
  margin-top: 10px;
  padding:0 20px;
}

.bet-action-buttons button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--success-color);
  color: white;
  transition: background 0.2s ease;
  width: 70%;
}

.bet-action-buttons button:nth-child(2) {
  background: var(--danger-color);
  width:30%;
}

.bet-action-buttons button:hover {
  opacity: 0.9;
}

@media (max-width: 600px) {
  .bet-action-buttons {
  padding: 0;
  }

  .bet-action-buttons button {
    width: 60%;
    font-size: 16px;
    padding: 7px 3px;
  }
  .bet-action-buttons button:nth-child(2) {
  width: 40%;
}
}
.main-content.dashboard{
  padding-top: 0;
}
@media (max-width:1024px){
  .colyourtickets h3 span {
    font-size: 11px;
}
.main-content.dashboard{
  padding: 0;
}
}



.selecttype {
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 3px;
  color: #333;
}

.boxamountkey label {
  width: 35%;
  text-align: left;
  display: block;
  padding-left: 10px;
}

#amount {
  width: 60%;
  padding: 8px;
  font-size: 16px;
  text-align: center;
  border: none;
}
@media (max-width:500px){
  div#totalAmount {
    font-size: 2.7vw;
}
    .moneybet {gap:0;margin-top: 5px;}
  .amount-control {}
  #amount {
  padding: 8px 0px;
  font-size: 4vw;
  height: 34px;
}
  .boxamountkey label {
    width: 35%;
    font-size: 3vw;
}

}

.boxnumberinsert {
  margin-top: 5px;
}

.boxnumberinsert button {
  margin: 5px 4px 0 0;
  padding: 8px 14px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  background-color: var(--info-color);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

@media (max-width:1024px){
  .boxnumberinsert button {
  padding: 2px 7px;
}
}
@media (max-width:500px){
  .boxnumberinsert button {
  font-size:3vw;
    margin:2px;
    margin-bottom:7px;
}
}

.boxnumberinsert button:hover {
 filter: brightness(1.2);
}

#morefunction {
  margin-top: 12px;
  font-size: 14px;
}

#doubleBtn {
  background-color: var(--success-color);
}

#doubleBtn:hover {
    filter: brightness(1.2);
}
.toggleLotteryTypeBox.pc {
    display: block !important;
    margin-bottom: 20px;
}
.toggleLotteryTypeBox.mb {
    display: none !important;
    padding: 7px;
    margin-bottom: 10px;
    margin-top: 10px;
    border-radius: 0;
}
@media (max-width:1024px){
  .toggleLotteryTypeBox.mb {
    margin-top: 0;
}
    .toggleLotteryTypeBox.pc {
    display: none !important;
}
.toggleLotteryTypeBox.mb {
    display: flex !important;
    justify-content: space-between;
    flex-direction: row-reverse;
    font-size: 18px;
    font-weight: 500;
    align-items: center;
}
}

#showMoreBtn {
  margin-top: 8px;
  padding: 6px 12px;
  border: none;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
}

#showMoreBtn:hover {
  background: #e0e0e0;
}

#rateList table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

#rateList th,
#rateList td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#rateList th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

#rateList td:last-child {
  text-align: right;
  font-weight: bold;
   /* เขียวอ่อน */
  color: var(--danger-color);
  filter: brightness(0.5);
}

@media (max-width: 600px) {
  #rateList table {
    font-size: 13px;
  }

  #rateList th,
  #rateList td {
    padding: 8px;
  }
}

a.logolink {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
}

div#showLockedFull {
        background: #fff6c9;
        padding: 10px;
        border-radius: 6px;
}

#walletHistoryList .pagination {
  margin-top: 15px;
  text-align: center;
}

#walletHistoryList .pagination button {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  color: #333;
  padding: 6px 12px;
  margin: 0 3px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#walletHistoryList .pagination button:hover {
  background-color: #e0e0e0;
}

#walletHistoryList .pagination button.active {
  background-color: var(--info-color);
  color: white;
  font-weight: bold;
  border-color: var(--info-color);
}


/* พื้นที่กล่องโพย */
#ticketContainer {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  gap: 1%;
  justify-content: flex-start;
}

/* กล่องรายการโพย */
.order-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px;
  width: 100%;
  max-width: 47%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
  position: relative;
}
.order-box h3{
  font-size:15px;
}

.order-box:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ปุ่มดูโพย */
.order-box button.btn-view {
  margin-top: 10px;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  position: absolute;
  transition: background-color 0.3s ease;
  right: 10px;
  bottom: 10px;
  width: 35%;
}

.order-box button.btn-view:hover {
  filter:brightness(1.2);
}

/* ส่วน pagination */
.ticket-pagination {
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

.ticket-pagination button {
  background-color: #eee;
  border: 1px solid #ccc;
  margin: 2px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.ticket-pagination button:hover {
  background-color: #ddd;
}

.ticket-pagination button.active {
  font-weight: bold;
  background-color: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

/* มือถือ */
@media screen and (max-width: 600px) {
  .order-box {
    max-width: 100%;
    padding: 12px;
  }

  .order-box h3 {
    font-size: 16px;
  }

  .order-box button.btn-view {
  }

  .ticket-pagination button {
    padding: 8px 10px;
    font-size: 13px;
  }
}

#ticketContainer .pagination {
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

#ticketContainer .pagination button {
  background-color: #eee;
  border: 1px solid #ccc;
  color: #333;
  padding: 6px 12px;
  margin: 2px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#ticketContainer .pagination button:hover {
  background-color: #ddd;
}

#ticketContainer .pagination button.active {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
  border-color: #4CAF50;
}

/* ✅ Responsive for mobile */
@media screen and (max-width: 600px) {
  #ticketContainer .pagination button {
    padding: 8px 10px;
    font-size: 13px;
  }
}



#profileBox .modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

#profileBox .modal.hidden {
  display: none;
}

#profileBox .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

#profileBox .modal-content {
  position: relative;
  background: white;
  max-width: 400px;
  margin: 80px auto;
  padding: 20px;
  border-radius: 12px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#profileBox .modal-content table {
  width: 100%;
  margin-bottom: 15px;
  border-collapse: collapse;
}

#profileBox .modal-content td {
  padding: 6px;
  font-size: 14px;
}
td.flexcenter {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

img.iconpersonal {
    width: 27px;
    height: auto;
}
#profileBox .modal-content input[type="password"] {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#profileBox .modal-content button {
  margin-right: 8px;
  padding: 8px 12px;
  border: none;
  background: var(--dark-color);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}
#profileBox .modal-content button.changepassbtn{
  background:var(--success-color);
}
#profileBox .modal-content button.changepassbtn:hover{background: var(--success-color);filter: brightness(1.3);}

#profileBox .modal-content button:hover {
  background: var(--danger-color);
}


.filters {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
}

.filters label {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  display: flex;
  flex-direction: column;
}


/* ✅ Responsive - มือถือ */
@media screen and (max-width: 600px) {
  .filters {
  }

  .filters label {
    width: 100%;
  }

  .filters select {
    width: 100%;
  }
}
.refresh-btn {
  margin-left: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: white;
}

.fa-spin-temp {
  animation: spin 1s linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* print */
#popup-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  max-width: 500px;
  width: 90%;
  padding: 20px;
  font-size: 14px;
}

#popup-content {
  max-height: 60vh;
  overflow-y: auto;
}

#popup-content h3 {
  margin-top: 0;
  font-size: 18px;
}

#popup-content div {
  margin-bottom: 5px;
  font-size: 14px;
}
#popupContent h3 {
  margin-bottom: 16px;
  color: #222;
  border-bottom: 1px solid #a8a8a8;
  padding-bottom: 8px;
}

/* ตารางโพย */
.popuptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 10px;
}
@media (max-width:450px){
  .popuptable {
  font-size: 3vw;
}
}

.popuptable th,
.popuptable td {
  padding: 6px;
  border: 1px solid #ddd;
  text-align: left;
}

.popuptable th {
  background-color: #f0f0f0;
}

.popuptable tr:nth-child(even) {
  background-color: #fafafa;
}

.popuptable tr:last-child {
  background-color: #f9f9f9;
  font-weight: bold;
}

/* ปุ่มใต้ popup */
.buttonpopupbox {
  margin-top: 15px;
  text-align: right;
}

.buttonpopupbox button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 14px;
  margin-left: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.buttonpopupbox button:hover {
  background-color: #388e3c;
}

/* Responsive popup */
@media screen and (max-width: 480px) {
  #popup-box {
    width: 95%;
    padding: 15px;
  }

  .buttonpopupbox {
    text-align: center;
  }

  .buttonpopupbox button {
    width: 45%;
    margin: 5px 2px;
  }
}

button#viewTicketBtn {
    background: var(--info-color);
    color: white;
    border: 1px solid var(--info-color);
}
.keypad.keypad-disabled button {
  opacity: 0.2;
}

.bet-item.highlight {
  animation: highlightFade 1s ease-out;
  background-color: var(--warning-color);
}

@keyframes highlightFade {
  from { background-color: var(--warning-color); }
  to { background-color: transparent; }
}
.slip-upload-flex {
  display: block;
  align-items: flex-start;
  gap: 15px;
  flex-wrap: nowrap; /* เผื่อกรณีหน้าจอเล็ก */
  flex-direction: row;
}

.slip-upload-flex.custom {
    display: flex;
}

#selectSlipBtn {
  padding: 10px 16px;
  background-color: var(--info-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}
div#slipPreview {
    position: relative;
    width: 15%;
}

div#slipPreview img {
    right: 0;
    position: absolute;
    width: 100%;
    bottom: -45px;
}

#selectSlipBtn:hover {
  background-color: #2980b9;
}

.slip-preview-box img {
  max-height: 120px;
  width: auto;
  border-radius: 8px;
  border: 1px solid #ccc;
  object-fit: contain;
  max-width: 100% !important;
}
.gotorateList {
  color: #ffffff;
}
.gotorateList button{
  background: var(--info-color);
  color: white;
}

.mobile-fixed-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #ffffff, #cccccc);
  display: flex;
  justify-content: space-around;
  z-index: 999;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 0 5px #00000033;
  overflow: hidden;
}

.mobile-fixed-menu a {
  flex: 1;
  text-align: center;
  padding: 3px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  border-right: 1px solid #cccccc;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mobile-fixed-menu a:last-child {
  border-right: none;
}

.mobile-fixed-menu a:hover {
  background-color: #f0f0f0;
}
.mobile-fixed-menu a.active {
  background: #ffffff;
  font-weight: 600;
  font-size: 15px;
  }

.mobile-fixed-menu a i {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

/* สีของแต่ละไอคอน */
.mobile-fixed-menu a.dashboard i {
  color: #007bff; /* น้ำเงิน */
}

.mobile-fixed-menu a.tickets i {
  color: #28a745; /* เขียว */
}

.mobile-fixed-menu a.deposit i {
  color: #ff9800; /* ส้ม */
}

.mobile-fixed-menu a.withdraw i {
  color: #dc3545; /* แดง */
}

@media (min-width: 768px) {
  .mobile-fixed-menu {
    display: none;
  }
}

.rateboxhome{
  margin-top: 8px;
}

.btn-view {
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.btn-info {
  background-color: var(--info-color);     /* รอผล - สีฟ้า */
}

.btn-success {
  background-color: var(--success-color);  /* ถูกรางวัล - สีเขียว */
}

.btn-danger {
  background-color: var(--danger-color);   /* ไม่ถูก - สีแดง */
}
.text-danger {
  color: var(--danger-color);   /* ไม่ถูก - สีแดง */
}

a.nav-link.icon {
    text-align: center;
    background: #bfbfbf45;
    padding: 10px;
    border-radius: 40px;
    height: 35px;
    width: 35px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    font-size: 18px;
}


button.btn-cancel {
  margin-top: 10px;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}


/* LOGIN REGISTER */
/* MODERN LOGIN / REGISTER */

:root{
  --auth-primary: var(--primary-color, #ff7300);
  --auth-primary-2: #ffb000;
  --auth-bg: rgba(255,255,255,.82);
  --auth-border: rgba(255,255,255,.45);
  --auth-text: #1f2937;
  --auth-muted: #6b7280;
  --auth-danger: #ef4444;
  --auth-radius: 22px;
}

*{
  box-sizing: border-box;
}

body{
  min-height: 100vh;
}

.main-content.loginpage,
.main-content.registerpage{
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
  overflow-y: auto;
  position: relative;
}

.main-content.loginpage::before,
.main-content.registerpage::before{
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255,115,0,.35), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255,176,0,.28), transparent 35%),
    rgba(0,0,0,.38);
  backdrop-filter: blur(2px);
  z-index: -1;
}

.login-box,
.register-container{
  width: 100%;
  max-width: 420px;
  padding: 26px 24px 24px;
  border-radius: var(--auth-radius);
  background: var(--auth-bg);
  border: 1px solid var(--auth-border);
  box-shadow:
    0 24px 70px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--auth-text);
  animation: authFade .35s ease both;
}

.register-container{
  max-width: 460px;
}

@keyframes authFade{
  from{
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logobox{
  text-align: center;
  margin-bottom: 10px;
}

.logobox img{
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.18));
}

.login-box h2,
.register-container h2{
  margin: 8px 0 22px;
  text-align: center;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--auth-text);
}

#loginForm .form-group,
.input-group{
  margin-bottom: 5px;
  text-align: left;
}

.login-box label,
.register-container label,
#loginForm .form-group label{
  display: block;
  margin: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.input-wrapper{
  position: relative;
}

.input-wrapper i{
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-primary);
  font-size: 14px;
  opacity: .85;
  pointer-events: none;
}

.login-box input,
.register-container input,
.register-container select,
.input-wrapper input{
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 14px;
  outline: none;
  background: rgba(255,255,255,.88);
  color: var(--auth-text);
  font-size: 14px;
  transition: .2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}

.input-wrapper input{
  padding-left: 42px;
}

.register-container select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.login-box input:focus,
.register-container input:focus,
.register-container select:focus,
.input-wrapper input:focus{
  border-color: rgba(255,115,0,.65);
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(255,115,0,.13),
    inset 0 1px 2px rgba(0,0,0,.04);
}

.login-box input::placeholder,
.register-container input::placeholder{
  color: #9ca3af;
}

.btn-container{
  margin-top: 20px;
}

.login-box button,
.register-container button{
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-2));
  box-shadow:
    0 12px 24px rgba(255,115,0,.28),
    inset 0 1px 0 rgba(255,255,255,.25);
  transition: .2s ease;
}

.login-box button:hover,
.register-container button:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 16px 30px rgba(255,115,0,.34),
    inset 0 1px 0 rgba(255,255,255,.3);
}

.login-box button:active,
.register-container button:active{
  transform: translateY(0);
}

.register-link{
  display: block;
  margin-top: 18px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 14px;
}

.register-link a{
  color: var(--auth-primary);
  font-weight: 800;
  text-decoration: none;
}

.register-link a:hover{
  text-decoration: underline;
}

.error,
.input-error,
#loginForm .input-error{
  display: block;
  min-height: 16px;
  margin-top: 5px;
  color: var(--auth-danger);
  font-size: 12px;
  font-weight: 600;
}

.contact-links{
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-item{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.1);
  background: rgba(255,255,255,.72);
  color: #374151;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: .2s ease;
}

.contact-item:hover{
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,.1);
}

.contact-icon{
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.login-btn{
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
}

@media (max-width: 480px){
  .main-content.loginpage,
  .main-content.registerpage{
    align-items: flex-start;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .login-box,
  .register-container{
    max-width: 100%;
    padding: 22px 16px 18px;
    border-radius: 20px;
  }

  .login-box h2,
  .register-container h2{
    font-size: 21px;
    margin-bottom: 18px;
  }

  .login-box input,
  .register-container input,
  .register-container select,
  .input-wrapper input{
    height: 45px;
    font-size: 14px;
  }
}
/* LOGIN REGISTER */



.order-box-modern {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 7px;
  margin-bottom: 10px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  font-family: 'Sarabun', sans-serif;
  width: 49.5%;
}
@media (max-width:767px){
  #ticketContainer {

  gap: 0%;
}
  .order-box-modern {
  width: 100%;
}
}

.order-box-modern .header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.order-box-modern .status {
  padding: 2px 8px;
  border-radius: 5px;
  background: #eee;
}

.order-box-modern .details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 5px;
}

.order-box-modern .lotto-type {
  font-size: 16px;
}

.order-box-modern .amount {
  font-size: 13px;
  text-align: right;
}
.order-box-modern .amount strong {
  color: var(--info-color);
  filter: brightness(0.5);
  font-size:17px
}

.order-box-modern .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.order-box-modern .buttons button {
  margin-left: 0;
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
@media (max-width:450px){
  .order-box-modern .header{
    font-size: 3vw;
  }
  .order-box-modern .date{
    font-size: 3vw;
  }
  .order-box-modern .buttons button {
  font-size: 11px;
}
}
.order-box-modern .btn-view {
  background: var(--info-color, blue); !important;
  color: white;
}

.order-box-modern .btn-success {
  background: var(--success-color, green); !important;
}

.order-box-modern .btn-danger {
  background: var(--danger-color) !important;
}

.order-box-modern .btn-cancel {
  background: var(--danger-color, #e74c3c);
  color: white;
}
.ticket-status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5%;
}

.filter-btn {
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  color: white;
  width: 19.5%;
  font-weight: 400;
  border: none;
}

.filter-btn .count {
  font-size: 12px;

}

.filter-btn.active {
  color: #d8d8d8;
  font-weight: bold;
  border-color: #007bff;
  filter: brightness(1.4);
}

@media (max-width: 600px) {
  .filter-btn .count {
  font-size: 12px;
  display:block;
    margin-top:5px;
}
  .filter-btn {
    width: 19%;
    font-size: 3vw;
    padding: 8px 3px;
  }
  .ticket-status-filter {
  gap: 1%;
}
}

.status-all     {background-color: #256d7e;}
.status-pending {background-color: #1e5cc7;}
.status-win     {background-color: #3c953f;}
.status-lose    {background-color: #a83c39;}
.status-cancel  {background-color: #bf5c0f;}
.lotto-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
}


.quick-amount-buttons {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.quick-amount-buttons button {
  padding: 5px 12px;
  border: 1px solid #ccc;
  background-color: #f2f2f2;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
}

.quick-amount-buttons button:hover {
  background-color: #dceeff;
  border-color: #88caff;
}


.error-message {
  color: red;
  font-size: 13px;
  margin-top: 0;
  display: block;
}
div#adminBankList h4 {
    margin-bottom: 10px;
}

input#Widthdrawinput {
    margin-bottom: 5px;
}

.wallet-layout-container {
  display: flex;
}
.wallet-main {
    width: 75%;
    padding: 0 15px;
}
h2.wallethead.pc {
    text-align: left;
    font-size: 20px;
}
h2.wallethead.mb {
    display: none;
}

@media (max-width:767px){
  .wallet-box {
  padding: 10px !important;
}
h2.wallethead.pc {
     display: none;
}
h2.wallethead.mb {
    display: block;
}
  img.icon-svg {
    width: 30px;
    margin-right: 5px;
}
.wallet-main {
    width: 100%;
    padding: 0;
}
.wallet-layout-container {
  display: block;
}
  
.wallet-box .tab-switch {
 display: flex;
 width: 100%;
 margin: 10px 0;
 text-align: center;
 flex-direction: row;
 justify-content: center;
}

.wallet-box .tab-switch {
  gap: 5px;
  padding:5px;
}

  .wallet-box .tab-switch button {
  padding: 5px;
  width: 100%;
  display: flex;
  justify-content: center;
  font-size: 13px;
}
  .quick-amount-buttons {
  gap: 7px;
}
.wallet-form {
  margin: auto;
  width: 100%;
}

}
.mobile-fixed-menu img.icon-svg {
    margin: 0;
    padding: 0;
}

td.icontablewallet div {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

td.icontablewallet div img.icon-svg {
    width: 20px;
}

.withdraw-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff3cd;
  border: 1px solid #ffa500;
  color: #856404;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 15px;
  box-shadow: 0 0 6px rgba(0,0,0,0.05);
  font-size: 14px;
  text-align: center;
}

.withdraw-warning .icon {
  font-size: 24px;
}

.withdraw-warning .text {
  line-height: 1.5;
}
.wallettab{
    -webkit-animation-duration: .5s;
    animation-duration: .5s;
    -webkit-animation-duration: calc(var(--animate-duration) * 0.5);
    animation-duration: calc(var(--animate-duration) * 0.5);
        -webkit-animation-name: fadeIn;
    animation-name: fadeIn;

}

.lottery-section {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 16px;
  background: #f9f9f9;
}
.main-content.result-box {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

div#resultsContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width:500px){
  div#resultsContainer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
}
.lottery-section h3 {
  margin-bottom: 12px;
  color: #333;
  font-size: 18px;
}

.lottery-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lottery-table th,
.lottery-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  font-weight: bold;
}

.lottery-table th {
  background-color: #f0f0f0;
  font-weight: bold;
  background: var(--primary-color);
  color: #ffffff;
}
.lottery-section h3 small {
    font-weight: 400;
    font-size: 14px;
}


  .lottery-table, .lottery-table thead, .lottery-table tbody, .lottery-table th, .lottery-table td, .lottery-table tr {
    display: block;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }
.lottery-table tbody{
  display: flex;
  gap: 1%;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
  .lottery-table tr {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0;
    width: 32.3333%;
    margin-bottom: 5px;
  }

@media (max-width:767px){
  .lottery-table tbody{
}
    .lottery-table tr {
    width: 49.5%;
  }

}

  .lottery-table tr:nth-child(1) {
width: 100%;

  }

  .lottery-table td {
    text-align: left;
    padding: 6px 12px;
    border: none;
    position: relative;
    text-align: center;
    
  }

  .lottery-table td:before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #555;
    display: none;
  }

  #toggleEditBtn{
    display: none;
  }
  .main-content.result-box h2 {
    text-align: center;
    margin-bottom: 10px;
}



/* FOOTER */
.main-footer {
   background-color: rgba(var(--navbar-rgb), 0.9); /* ต้องประกาศแยก rgb ก่อน */
   padding: 20px 20px;
   font-size: 14px;
   margin-top: auto;
}
@media (max-width:767px){
  .main-footer {padding-bottom: 75px;}
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1500px;
  margin: auto;
}

.footer-column.footer-left {
    text-align: center;
}
.footer-column {
  width: 33.33%;
}
.footer-column h3{
  font-size:20px;
  margin-bottom: 7px;
}

.footer-logo {
  width: 140px;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.5;
}

.footer-links a {
  display: inline-block;
  text-decoration: none;
  transition: color 0.2s;
  padding: 7px;
  border-radius: 5px;
}
.footer-links a:hover{
  background: #00000021;
}
@media (max-width:767px){
  .footer-links a {
  display: inline-block;
  margin: 4px;
}
}

.footer-links a:hover {
  filter:brightness(1.2);
}

.footer-contact a {
  color: #80caff;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-note {
  font-size: 12px;
  margin-top: 8px;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: #888;
  border-top: 1px solid #333;
  padding-top: 10px;
  margin-top: 10px;
}



.footer-column.footer-contact a img {
    width: 30px;
}

.footer-column.footer-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px;
    background: #00000012;
    border-radius: 10px;
    width: 100%;
    max-width: 300px;
    margin-left: -5px;
    margin-bottom: 5px;
}

.footer-column.footer-contact a:hover {
    background: #ffffff33;
    padding: 10px;
    text-decoration: none;
}
@media (max-width: 767px) {
  .footer-column.footer-contact a {
    margin:15px auto;
}

  .footer-container {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-column {
    max-width: 100%;
    width: 100%;
    margin: 7px 0;
  }

  .footer-bottom {
  }
}

/* FOOTER */


/* Contact Fixed */
.contact-floating-wrapper {
  position: fixed;
  right: 15px;
  bottom: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all .3s;
}
@media (max-width:767px){
  .contact-floating-wrapper {
  position: fixed;
  right: 5px;
  bottom: 65px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all .3s;
}
}
/* ปุ่ม toggle */
.contact-toggle-btn {
  color: white;
  border: none;
  padding: 7px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  cursor: pointer;
  justify-content: center;
  transition: all .3s;
  background: linear-gradient(135deg, #ffffff 50%, #606060 100%);
}
@media (max-width:767px){
  .contact-toggle-btn{
    display:none;
  }
}
.contact-toggle-btn:hover img{
  transform:scale(1.1);
}
.iconcontact{
  width: 40px;
  height:auto;
}
.contact-toggle-btn:hover {
  background-color: #d4d4d4;
  transform: scale(1.1);
}

/* เมนูไอคอน */
.contact-floating {
  display: none; /* 🔒 ซ่อนไว้ก่อน */
  flex-direction: column;
  gap: 5px;
  animation: slide-up 0.3s ease-out forwards;
}

.contact-floating.show {
  display: flex;
}

/* ไอคอนแต่ละอัน */
.contact-floating a img {
  width: 40px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  margin-bottom: 3px;
}



.contact-floating a:hover img {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgb(0 0 0 / 14%);
}

/* slide animation */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

select {
  padding: 7px;
  padding-right: 30px; /* เว้นที่สำหรับลูกศร */
  background-color: white; /* พื้นหลังสีขาว */
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
tbody#ticketTableBody tr:nth-child(even) {
    background: #f1f1f1;
}

#ticketContainer {
    display: flex
;
    flex-wrap: wrap;
    padding: 10px;
    gap: 1%;
    justify-content: flex-start;
}

#ticketContainer p {
  color: #d9534f; /* สีแดงเข้ม */
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}


div#tempMessage {
    padding: 5px;
    background: white;
    border-radius: 3px;
    margin: 5px;
    border: 1px solid red;
    color: red;
    font-weight: bold;
}
.emtry-ticket {
        padding: 20px;
        text-align: center;
        background-color: #fffafc;
        border: 1px solid #ffd4d4;
        border-radius: 6px;
        width: 100%;
}


