.dashboard-content-section {
    padding: 64px 16px;
    min-height: calc(100vh - 220px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr; /* กำหนดให้ Grid มี 1 คอลัมน์ (1fr หมายถึง 1 ส่วนที่แบ่งจากพื้นที่ทั้งหมด) */
    column-gap: 16px;
    row-gap:16px;
    place-items: center; /* คำสั่งนี้เท่ากับการใช้ align-items: center; + justify-items: center; ส่งผลให้ เนื้อหาภายในแต่ละ Grid Cell ถูกจัดกึ่งกลาง ทั้งแนวตั้งและแนวนอน */
}
@media screen and (min-width: 800px) {
    .dashboard-grid-2 {
        grid-template-columns: 1.2fr 3.8fr;
        align-items: start; /* ทำให้ เนื้อหาในแต่ละคอลัมน์ชิดด้านบน ของ grid cell ❗ */
        max-width: 1200px;
        margin: auto;
        gap: 32px;
    }
}
.dashboard-grid-2 > div {
    width: 100%; /* แต่ละ div ขยายเต็มพื้นที่ของคอลัมน์ที่มันอยู่ ไม่ให้เกิดช่องว่างข้างใน */
}
.dashboard-left-column {
    gap:12px;
    padding: 12px 8px;
    width: 250px;
    background-color: white;
    display: grid;
    border-radius: 8px;
}
.dashboard-head-address {
    display: flex;
    justify-content: space-between;
}
.dashboard-detail-profile {
    background-color: white;
    padding: 12px 16px;
    border-radius: 8px;
}
.dashboard-detail-address {
    margin-top: 12px;
    background-color: white;
    padding: 12px 16px;
    border-radius: 8px;
}
.dashboard-profile {
    text-align: center;
}

.dashboard-profile img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.dashboard-profile p {
    font-weight: bold;
    margin: 8px 0;
}

.dashboard-menu {
    display: grid;
    gap: 12px;
}

.dashboard-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    color:#667085;
    transition: background 0.3s;
}
.dashboard-menu-item:hover {
    background: #f1f1f1;
}

.dashboard-menu-item.active {
    color: #344054;
    font-weight: bold;

}
@media screen and (max-width: 600px) {
    .dashboard-left-column {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100px;
        justify-content: center;
    }
    .dashboard-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .dashboard-menu-item {
        padding: 8px 16px;
        background: #f5f5f5;
        border-radius: 20px; /* ทำให้เป็น chip */
        font-size: 14px;
        white-space: nowrap; /* ป้องกันขึ้นบรรทัดใหม่ */
    }
}
.dashboard-right-column {

}
.dashboard-overlay {
    position: fixed;  /* เปลี่ยนจาก absolute เป็น fixed */
    top: 0;
    left: 0;
    width: 100vw; /* ปกคลุมเต็มหน้าจอ */
    height: 100vh; /* ปกคลุมเต็มหน้าจอ */
    background: rgba(0, 0, 0, 0.3); /* สีดำโปร่งใส */
    z-index: 1001; /* ทำให้ overlay อยู่ด้านบนสุด */
    opacity: 0;
    pointer-events: none;
}
.dashboard-modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    background: #F5FAFE;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001; /* ให้อยู่ด้านบนสุด */
    display: flex;
    flex-direction: column;
    align-items: start;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
    transform: translate(-50%, -50%) scale(1);

    /* ขนาดสูงสุด */
    width: 600px;
    max-width: 90%; /* ป้องกันไม่ให้ใหญ่เกินไป */

    /* ความสูงสูงสุด */
    max-height: 90vh; /* 90% ของ viewport height */
    min-height: 300px; /* กำหนดขั้นต่ำเพื่อป้องกัน modal เล็กเกินไป */
    overflow-y: auto; /* ให้สามารถเลื่อน scroll ได้ถ้าสูงเกิน */
    border-radius: 12px;
}

/* สำหรับจอแท็บเล็ต (ขนาดกลาง) */
@media (max-width: 768px) {
    .dashboard-modal-box {
        width: 80%; /* ปรับขนาดเป็น 80% ของจอ */
        max-width: 500px;
        padding: 15px;
        border-radius: 10px;
    }
}

/* สำหรับจอมือถือ (ขนาดเล็ก) */
@media (max-width: 480px) {
    .dashboard-modal-box {
        width: 90%; /* ปรับขนาดเป็น 90% ของจอ */
        max-width: 400px;
        padding: 10px;
        border-radius: 8px;
    }
    .dashboard-form-row {
        gap: 6px;
    }
  
    .dashboard-header-order-card {
        display: block !important;
    }
}
.dashboard-modal-buttons {
    width: 100%;
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.dashboard-modal-buttons button {
    font-size: 18px;
    font-weight: 400;
    color: #fff;
    padding: 10px 14px;
    border: none;
    background:  #7494ec;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    width:100%;
}
.dashboard-modal-buttons button:hover {
    background-color: #265df2;
}
.dashboard-content-section.active .dashboard-show-modal {
    display: none;
}
.dashboard-content-section.active .dashboard-overlay {
    opacity: 1;
    pointer-events: auto;
}
.dashboard-content-section.active .dashboard-modal-box  {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}
.dashboard-form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}
/* ให้ full_name ขยายเต็มที่ หักลบกับขนาดของ mobile */
.dashboard-form-field.full-name {
    flex: 1; /* ขยายเต็มที่ */
}

/* ให้ mobile มีขนาดคงที่ */
.dashboard-form-field.mobile {
    flex: 0 0 150px; /* กำหนดให้ mobile มีขนาดคงที่ 180px */
}

/* สไตล์เฉพาะ input[type="number"] ที่อยู่ภายใน .dashboard-form-field */
.dashboard-form-field input[type="number"] {
    width: 100%;
    height: 40px; /* กำหนดความสูง */
    font-size: 16px; /* ขนาดตัวอักษร */
    font-weight: bold; /* ตัวอักษรหนา */
    border: 1px solid #E4E7EC; /* กรอบสีส้ม */
    border-radius: 8px; /* ขอบมน */
    text-align: left; /* ข้อความชิดซ้าย */
    padding: 6px 8px 6px 8px;
    background-color: #FFFFFF; /* สีพื้นหลังอ่อน */
    color: #344054; /* สีตัวอักษร */
    transition: all 0.3s ease-in-out; /* เพิ่ม transition */
}

/* เมื่อคลิก input */
.dashboard-form-field.mobile input[type="number"]:focus {
    border-color: 1px solid #5D8736; /* เปลี่ยนสีกรอบ */
    background-color: #FFFFFF;
    box-shadow: none; /* ปิดการใช้งานเงา */
}

/* ปรับปุ่มเพิ่ม/ลดให้สวยขึ้น */
.dashboard-form-field input[type="number"]::-webkit-inner-spin-button,
.dashboard-form-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dashboard-form-field input[type="text"] {
    width: 100%;
    /* max-width: 300px; */
    height: 40px; /* กำหนดความสูง */
    font-size: 16px; /* ขนาดตัวอักษร */
    font-weight: bold; /* ตัวอักษรหนา */
    border: 1px solid #E4E7EC; /* กรอบสีส้ม */
    border-radius: 8px; /* ขอบมน */
    text-align: left; /* ข้อความชิดซ้าย */
    padding: 6px 8px 6px 8px;
    background-color: #FFFFFF; /* สีพื้นหลังอ่อน */
    color: #344054; /* สีตัวอักษร */
    transition: all 0.3s ease-in-out; /* เพิ่ม transition */
}

/* เมื่อคลิก input */
.dashboard-form-field input[type="text"]:focus {
    border-color: 1px solid #5D8736; /* เปลี่ยนสีกรอบ */
    background-color: #FFFFFF;
}

/* ปรับปุ่มเพิ่ม/ลดให้สวยขึ้น */
.dashboard-form-field input[type="text"]::-webkit-inner-spin-button,
.dashboard-form-field input[type="text"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dashboard-address-options {
    display:grid;
    gap: 8px;
}
.dashboard-address-detail-card {
    margin: 8px 4px;
    width: 78%;
}
.dashboard-order-card p {
    margin: 2px 0px;
    color:#344054;
}
.dashboard-order-card {
    border-radius: 6px;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0.0625em 0.0625em, rgba(0, 0, 0, 0.25) 0px 0.125em 0.5em, rgba(255, 255, 255, 0.1) 0px 0px 0px 1px inset;
    padding: 4px 8px;
    margin-top: 18px;
    background: #F9F6F7;
}
.dashboard-order-link:hover {
    background-color: #f9fafb; /* optional: เปลี่ยนสีพื้นหลังเวลา hover */
}
.dashboard-header-order-card {
    display: flex;
    justify-content: space-between;
}
.dashboard-order-list {
    display: block;
    background: #FFFFFF;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.dashboard-product-row {
    display: flex;
    align-items: center;
    text-align: center;
    padding: 8px 0;
    color:#344054;
}

.dashboard-product-name {
    width: 60%;
    text-align: left;
}

.dashboard-product-quantity {
    width: 10%;
    text-align: center;
}

.dashboard-product-price {
    width: 30%;
    text-align: right;
}

.order-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    margin-top: 12px;
}

.order-status-filters a {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f1f1f1;
    color: #344054;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.order-status-filters a.active {
    background-color: #28a745;
    color: white;
}

.order-status-filters a:hover {
    background-color: #218838;
    color: white;
}