 * {
     box-sizing: border-box;
 }

 body {
     font-family: Arial, sans-serif;
     background-color: #f3f4f6;
     margin: 0;
     padding: 20px;
 }

 .container {
     display: flex;
     flex-wrap: wrap;
     justify-content: center;
     gap: 16px;
     /* ปรับจาก 20px */
 }


 .card {
     width: 100%;
     max-width: 230px;
     /* ลดจาก 300px เป็น 220px */
     background: #ffffff;
     border-radius: 12px;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     overflow: hidden;
     transition: transform 0.3s ease, box-shadow 0.3s ease;
 }

 @media (max-width: 768px) {
     .card {
         max-width: 100%;
     }
 }



 .card:hover {
     transform: translateY(-10px);
     box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
 }

 .card img {
     width: 100%;
     height: auto;
     border-bottom: 1px solid #eaeaea;
 }

 .card .content {
     padding: 15px;
 }

 .card .title {
     font-size: 14px;
     font-weight: bold;
     margin: 0 0 10px;
     color: #333;
 }

 .card .description {
     font-size: 14px;
     color: #666;
     line-height: 1.6;
 }

 .card form {
     margin-top: 15px;
 }

 .card input[type="password"] {
     width: 100%;
     padding: 8px;
     margin-bottom: 10px;
     border: 1px solid #ccc;
     border-radius: 6px;
 }

 .card button {
     display: block;
     width: 100%;
     padding: 10px 15px;
     background: #007BFF;
     color: #fff;
     border: none;
     border-radius: 6px;
     font-size: 14px;
     cursor: pointer;
 }

 .card button:hover {
     background: #0056b3;
 }

 .card a.link {
     color: #459fff;
     text-decoration: none;
     font-size: 15px;
 }

 .card a.link:hover {
     /*text-decoration: underline; */
     color: #095c96;
     cursor: pointer;
 }

 footer {
     position: fixed;
     bottom: 0;
     left: 0;
     width: 100%;
     background-color: #ecf1f5;
     color: #333;
     text-align: center;
     padding: 12px 10px;
     font-size: 14px;
     border-top: 1px solid #ccc;
     z-index: 1000;
 }

 body {
     margin-bottom: 60px;
     /* กันไม่ให้เนื้อหาถูก footer ทับ */
 }

 footer a {
     color: #007BFF;
     text-decoration: none;
 }

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

 /* ===========================================
   Service Card Slide (Mobile Only)
=========================================== */

 @media (max-width:768px) {

     .container {

         display: flex;
         flex-wrap: nowrap;
         justify-content: flex-start;

         overflow-x: auto;
         overflow-y: hidden;

         gap: 15px;

         padding-bottom: 10px;

         scroll-behavior: smooth;
         -webkit-overflow-scrolling: touch;
     }

     .container::-webkit-scrollbar {
         display: none;
     }

     .card {
         flex: 0 0 280px;
         max-width: 280px;
     }

 }

 /* ===========================================
   Dashboard (ไม่กระทบกับ .container และ .card)
=========================================== */

 .dashboard {
     display: flex;
     flex-wrap: wrap;
     justify-content: center;
     gap: 18px;
     margin-bottom: 30px;
 }

 .stat-card {
     width: 220px;
     background: #fff;
     border-radius: 12px;
     box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
     padding: 20px;
     text-align: center;
     transition: .25s;
 }

 .stat-card:hover {
     transform: translateY(-4px);
     box-shadow: 0 8px 18px rgba(0, 0, 0, .15);
 }

 .stat-card h2 {
     margin: 0;
     color: #1565C0;
     font-size: 34px;
     font-weight: bold;
 }

 .stat-card p {
     margin-top: 10px;
     color: #666;
     font-size: 14px;
 }

 /* ---------- มือถือ ---------- */

 @media (max-width:768px) {

     .dashboard {
         flex-wrap: nowrap;
         justify-content: flex-start;
         overflow-x: auto;
         overflow-y: hidden;
         padding-bottom: 10px;
         gap: 12px;

         scroll-behavior: smooth;
         -webkit-overflow-scrolling: touch;
     }

     .dashboard::-webkit-scrollbar {
         display: none;
     }

     .stat-card {
         flex: 0 0 170px;
         width: 170px;
     }

     .stat-card h2 {
         font-size: 28px;
     }

 }


 /* ==========================
   Summary Dashboard
========================== */

 .summary-card {

     background: #ffffff;

     border-radius: 16px;

     box-shadow: 0 4px 12px rgba(0, 0, 0, .08);

     margin-bottom:15px;

     overflow: hidden;

 }

 .summary-title {

     background: #1565C0;

     color: #fff;

     padding: 16px 20px;

     font-size: 18px;

     font-weight: bold;

 }

 .summary-body {

     display: flex;

 }

 .summary-item {

     flex: 1;

     text-align: center;

     padding: 9px 5px;

     border-right: 1px solid #ececec;

 }

 .summary-item:last-child {

     border-right: none;

 }

 .summary-value {

     font-size: 34px;

     font-weight: bold;

     color: #1565C0;

     margin-bottom: 5px;

 }

 .summary-label {

     font-size: 15px;

     color: #666;

 }

 /* ==========================
   Mobile
========================== */

 @media (max-width:768px) {

     .summary-body {

         overflow-x: auto;

         display: flex;

         -webkit-overflow-scrolling: touch;

     }

     .summary-body::-webkit-scrollbar {

         display: none;

     }

     .summary-item {

         min-width: 150px;

         flex: none;

     }

     .summary-value {

         font-size: 28px;

     }

     .summary-title {

         font-size: 16px;

     }

 }