.account-dashboard{
    direction: rtl;
    max-width: 1400px;
    margin: 40px auto;
}

.dashboard-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:30px;
}

.stat-box{
    background:#fff;
    padding:30px;
    border-radius:12px;
    box-shadow:0 1px 18px -10px rgba(0 0 0 / 10%);
    text-align:center;
}

.dashboard-body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.dashboard-sidebar {
    width: 260px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.dashboard-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-menu li {
    margin-bottom: 8px;
}

.dashboard-menu li a {
    display: block;
    padding: 14px 16px;
    border-radius: 10px;
    color: #333;
    text-decoration: none;
    transition: all .2s ease;
}

.dashboard-menu li a:hover {
    background: #f5f7fa;
}

.dashboard-menu li.is-active a {
    background: #ef4056;
    color: #fff;
    font-weight: 600;
}

.dashboard-main {
    flex: 1;
    padding: 6px;
    border-radius: 14px;
}
 
.orders-list {
    background: #fff;
    padding: 5px 15px;
    border-radius: 8px;    
}

/* --------مرتب کردن جدول سفارشات--------- */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-orders-table th,
.woocommerce-orders-table td {
    padding: 30px;
    background: #fff;

    text-align: center;
}
/*-----------------*/

.status-completed{
    color:green;
    font-weight:bold;
}

.status-cancelled{
    color:red;
    font-weight:bold;
}

.status-pending{
    color:orange;
    font-weight:bold;
}

.global-notification{
    background:#fff3cd;
    border-right:5px solid #ffc107;
    padding:20px;
    margin-bottom:20px;
    border-radius:12px;
}


.tracking-dashboard {
    padding: 25px;
    background: #f7f8fa;
    min-height: 100vh;
}

.tracking-header {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tracking-header h2 {
    margin: 0;
    font-size: 20px;
}

.tracking-header p {
    margin: 5px 0 0;
    color: #777;
    font-size: 14px;
}

.tracking-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.customer-tracking-box {
    margin-top: 30px;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.tracking-box-header {
    margin-bottom: 20px;
}

.tracking-box-header h3 {
    margin: 0;
    font-size: 20px;
}

.tracking-box-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tracking-item {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
}

.tracking-item span {
    color: #666;
}

.tracking-item strong {
    color: #222;
}


.tracking-copy-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tracking-copy-box button {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.tracking-link {
    display: inline-block;
    background: #ef4056;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
}

.tracking-link:hover {
    opacity: 0.9;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
@media (max-width: 1024px) {

    .account-dashboard {
        padding: 0 20px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-sidebar {
        width: 220px;
    }

}

@media (max-width: 768px) {

    .account-dashboard {
        margin: 20px auto;
        padding: 0 15px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dashboard-body {
        flex-direction: column;
        gap: 20px;
    }

    .dashboard-main {
        width: 100%;
        padding: 6px;
    }

}

@media (max-width: 768px) {

    .dashboard-menu li a {
        padding: 12px;
        font-size: 14px;
    }

}

@media (max-width: 768px) {

    .tracking-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

}
@media (max-width: 768px) {

    .tracking-copy-box {
        flex-direction: column;
        align-items: flex-start;
    }

}
@media (max-width: 480px) {

    .dashboard-main,
    .dashboard-sidebar,
    .customer-tracking-box {
        padding: 6px;
    }

    .tracking-box-header h3,
    .tracking-header h2 {
        font-size: 18px;
    }

}

@media (max-width: 768px) {
    .dashboard-sidebar {
        display: none;
    }
}

/* Action Button */
a.woocommerce-button.button.view {
    display: inline-block !important;
    background: #ef4056 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
}

a.woocommerce-button.button.view:hover {
    background: #e23349 !important;
}.mobile-account-tabs {
    display: none;
}

@media (max-width: 768px) {

    .mobile-account-tabs {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 10px;
        margin-bottom: 20px;
        scrollbar-width: none;
    }

    .mobile-account-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-account-tabs a {
        white-space: nowrap;
        padding: 10px 16px;
        background: #fff;
        border-radius: 30px;
        text-decoration: none;
        color: #333;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        font-size: 14px;
    }

    .mobile-account-tabs a.is-active {
        background: #ef4056;
        color: #fff;
    }
}
/* کدهای جدید برای تبدیل به کارت سفارش */

@media (max-width: 768px) {

    .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-orders-table,
    .woocommerce-orders-table tbody,
    .woocommerce-orders-table tr,
    .woocommerce-orders-table td {
        display: block;
        width: 100%;
    }

    .woocommerce-orders-table {
        border: none;
    }

    .woocommerce-orders-table__row {
        display: block;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,.04);
    }

    .woocommerce-orders-table__cell {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 0 !important;
        border: none !important;
        text-align: right !important;
    }

    .woocommerce-orders-table__cell::before {
        content: attr(data-title);
        font-weight: 600;
        color: #666;
        font-size: 13px;
        flex-shrink: 0;
    }

    .woocommerce-orders-table__cell a {
        word-break: break-word;
    }

    .woocommerce-orders-table__cell-order-actions {
        margin-top: 12px;
        padding-top: 12px !important;
        border-top: 1px solid #eee !important;
    }

    .woocommerce-orders-table__cell-order-actions .button {
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 12px;
    }
}

/* وضعیت سفارش‌های مشتری */
@media (max-width: 768px) {
    .dashboard-stats {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        scrollbar-width: none;
    }

    .dashboard-stats::-webkit-scrollbar {
        display: none;
    }

    .dashboard-stats .stat-box {
        flex: 0 0 calc(50% - 5px);
        min-width: calc(50% - 5px);
        box-sizing: border-box;
    }
}
.dashboard-stats {
    scrollbar-width: none;
}

.dashboard-stats::-webkit-scrollbar {
    display: none;
}

/*---اطلاعات خریدار----*/
.user-info {
    background: #fff;
    padding: 5px 15px;
    border-radius: 8px;
    overflow: hidden;
}

.user-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 20px;
}
 
.info-box {
    padding: 15px;
    border-top: 1px solid #e5e5e5;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.info-box span {
    display: block;
    color: #666;
    font-size: 14px;
}

.full-width {
    grid-column: 1 / -1;
}

/*-------فاصله بین بلوک های پیشخوان کاربری--------*/
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
/*-------جزییات سفارش حساب کاربری--------*/
.woocommerce-order-details {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.woocommerce-order-details__title {
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* ===== TABLE ===== */
.woocommerce-table.order_details {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 12px;
}

.woocommerce-table.order_details thead {
    background: #f8f9fb;
}

.woocommerce-table.order_details th,
.woocommerce-table.order_details td {
    padding: 18px 20px;
    text-align: right;
}

.woocommerce-table.order_details tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-table.order_details tbody tr:not(:last-child) td {
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-table.order_details a {
    color: #222;
    text-decoration: none;
    font-weight: 500;
}

.product-quantity {
    color: #777;
    font-size: 14px;
    margin-right: 8px;
}

/* ===== TFOOT ===== */
.woocommerce-table.order_details tfoot th {
    color: #666;
    font-weight: 500;
    border-top: 1px solid #f0f0f0;
}

.woocommerce-table.order_details tfoot td {
    font-weight: 600;
    border-top: 1px solid #f0f0f0;
}

.woocommerce-table.order_details tfoot tr:last-child {
    background: #fafafa;
}

.woocommerce-table.order_details tfoot tr:last-child td,
.woocommerce-table.order_details tfoot tr:last-child th {
    font-size: 18px;
    font-weight: 700;
}
/* ===== آدرس  ===== */
.woocommerce-customer-details {
    margin-top: 30px;
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.woocommerce-column__title {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.woocommerce-customer-details address {
    font-style: normal;
    line-height: 2.2;
    color: #444;
    font-size: 15px;
    margin: 0;
}

.woocommerce-customer-details--phone,
.woocommerce-customer-details--email {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid #f1f1f1;
    color: #333;
}

.woocommerce-Address {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    margin-bottom: 25px;
}

.woocommerce-Address-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.woocommerce-Address-title h2 {
    margin: 0;
    font-size: 20px;
    color: #222;
    font-weight: 700;
}

.woocommerce-Address .edit {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    transition: .2s;
}

.woocommerce-Address .edit:hover {
    background: #111;
    color: #fff;
}

.woocommerce-Address address {
    margin: 0;
    font-style: normal;
    line-height: 2.2;
    color: #444;
    font-size: 15px;
}

@media (max-width: 768px) {
    .woocommerce-Address-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .woocommerce-Address .edit {
        width: 100%;
        text-align: center;
    }
}

/* ===== FORM CARD ===== */
.woocommerce-MyAccount-content form {
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.woocommerce-MyAccount-content form h2 {
    margin: 0 0 25px;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* ===== GRID ===== */
.woocommerce-address-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Full width fields */
.form-row-wide,
#billing_country_field,
#billing_address_1_field,
#billing_address_2_field,
#billing_city_field,
#billing_state_field,
#billing_postcode_field,
#billing_phone_field,
#billing_email_field {
    grid-column: 1 / -1;
}

/* ===== LABEL ===== */
.woocommerce form .form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* ===== INPUT ===== */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    transition: .2s;
}

.woocommerce form .form-row textarea {
    height: 120px;
    padding-top: 15px;
}

/* Focus */
.woocommerce form .form-row input:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    border-color: #111;
    outline: none;
}

/* Remove Woo margins */
.woocommerce form .form-row {
    margin: 0;
    width: 100%;
}

/* ===== SELECT2 ===== */
.select2-container .select2-selection--single {
    height: 50px !important;
    border: 1px solid #ddd !important;
    border-radius: 12px !important;
}

.select2-selection__rendered {
    line-height: 50px !important;
    padding-right: 16px !important;
}

.select2-selection__arrow {
    height: 50px !important;
}

/* ===== BUTTON ===== */
.woocommerce-MyAccount-content button.button {
    background: #111;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 30px;
    font-size: 15px;
}

.woocommerce-MyAccount-content button.button:hover {
    opacity: .9;
}

