/* --- 1. Reset & Variables (Clean & Solid) --- */
:root {
    --kd-primary: #FFC107;
    --kd-text-dark: #000000;
    --kd-text-grey: #8a8a8e;
    --kd-bg-white: #ffffff;
    --kd-border-color: #efeff4; /* رنگ خطوط اپل */
    --kd-radius: 18px;
}

/* حذف کامل المان‌های قالب قبلی */
.woocommerce-account .dina-my-account-footer,
.woocommerce-account footer.dina-my-account-footer,
.woocommerce-MyAccount-content .dina-dashboard-stats,
.woocommerce-MyAccount-content .dina-dashboard-items,
.woocommerce-account .dina-userpanel-style-one > .row > .col-12 > .woocommerce > .woocommerce-MyAccount-navigation-con {
    display: none !important;
}

.woocommerce-account .dina-userpanel-style-one {
    padding-top: 0 !important;
    margin-top: 5px !important;
}

.woocommerce-MyAccount-content {
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* --- 2. Notifications (Solid & Clean) --- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message {
    background: var(--kd-bg-white) !important;
    border: 1px solid var(--kd-border-color) !important;
    border-radius: 14px !important;
    color: var(--kd-text-dark) !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* حذف خط رنگی پیش‌فرض */
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none !important; }

/* بوردر رنگی باریک سمت راست */
.woocommerce-message { border-right: 4px solid #34c759 !important; }
.woocommerce-info { border-right: 4px solid #007aff !important; }
.woocommerce-error { border-right: 4px solid #ff3b30 !important; }

.woocommerce-message .button {
    float: left !important;
    background: #f2f2f7 !important;
    color: #000 !important;
    border: none !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    font-size: 0.8rem !important;
}

/* --- 3. Header Bar --- */
.kmc-header-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 15px; padding: 10px 5px;
}
.kmc-back-btn {
    width: 40px; height: 40px; background: #fff;
    border: 1px solid var(--kd-border-color); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--kd-text-dark);
}
.kmc-page-title { font-size: 1.1rem; font-weight: 800; color: var(--kd-text-dark); }

/* --- 4. Forms (Solid White) --- */
.woocommerce-EditAccountForm,
.woocommerce-Address,
form.woocommerce-EditAccountForm,
form.woocommerce-address-form,
.woocommerce-table--order-details {
    background: var(--kd-bg-white);
    border: 1px solid var(--kd-border-color);
    border-radius: var(--kd-radius);
    padding: 20px !important;
    margin-bottom: 25px;
}

.woocommerce-form-row {
    float: none !important; width: 100% !important; display: block !important; margin-bottom: 15px !important;
}

.woocommerce-Input, input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
    width: 100% !important; height: 48px !important; padding: 0 15px !important;
    background: #f2f2f7 !important; /* خاکستری خیلی روشن */
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important; color: #000 !important;
    box-shadow: none !important;
}
.woocommerce-Input:focus, input:focus {
    background: #fff !important; border-color: var(--kd-primary) !important;
}

.woocommerce-Button.button {
    width: 100%; padding: 14px !important; border-radius: 12px !important;
    background: var(--kd-primary) !important; color: #000 !important;
    border: none !important; font-weight: bold; margin-top: 10px;
}

/* --- 5. Dashboard Cards (Solid White) --- */
.kd-wrapper { font-family: inherit; direction: rtl; padding-bottom: 40px; }
.kd-card {
    background: var(--kd-bg-white);
    border: 1px solid var(--kd-border-color);
    border-radius: var(--kd-radius);
    margin-bottom: 15px;
}

/* پروفایل */
.kd-profile-compact { padding: 20px; }
.kd-profile-top { margin-bottom: 20px; }
.kd-avatar-row { display: flex; align-items: center; }
.kd-avatar-row img { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--kd-border-color); }
.kd-user-details { margin-right: 15px; flex: 1; }
.kd-user-details h3 { font-size: 1.1rem; margin: 0; font-weight: 700; color: #000; }
.kd-user-details span { font-size: 0.9rem; color: var(--kd-text-grey); }
.kd-edit-mini {
    width: 36px; height: 36px; background: #f2f2f7; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; color: #000;
}

/* کیف پول (فشرده) */
.kd-wallet-inline {
    background: #fff8e1; /* زرد خیلی روشن سالید */
    border-radius: 16px; padding: 12px 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.kd-wallet-info { display: flex; align-items: center; }
.kd-wallet-icon-circle {
    width: 38px; height: 38px; background: #fff; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: #f59e0b; font-size: 1.1rem;
}
.kd-wallet-text { margin-right: 12px; display: flex; flex-direction: column; justify-content: center; }
.kd-wallet-text span { font-size: 0.75rem; color: var(--kd-text-grey); margin-bottom: 2px; }
.kd-balance-num { font-weight: 800; font-size: 1rem; color: #000; line-height: 1; }
.kd-add-btn-small {
    background: #fff; color: #000 !important; padding: 8px 14px;
    border-radius: 8px; font-size: 0.85rem; font-weight: 600; text-decoration: none;
    border: 1px solid rgba(0,0,0,0.05); white-space: nowrap;
}

/* آمار سفارشات (گرید ثابت) */
.kd-section-header { display: flex; justify-content: space-between; padding: 5px; margin-bottom: 10px; margin-top: 10px; }
.kd-section-header h4 { font-size: 1rem; font-weight: 700; margin: 0; }
.kd-section-header a { font-size: 0.85rem; color: var(--kd-text-grey); }

.kd-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 25px;
}
.kd-stat-item {
    background: var(--kd-bg-white);
    border: 1px solid var(--kd-border-color);
    border-radius: 16px; padding: 12px 5px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none !important;
}
.kd-stat-icon {
    width: 42px; height: 42px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 8px; position: relative;
}
/* رنگ‌های سالید و روشن برای آیکون‌ها */
.kd-stat-icon.processing { color: #007aff; background: #eef7ff; }
.kd-stat-icon.on-hold { color: #ff9500; background: #fff8eb; }
.kd-stat-icon.completed { color: #34c759; background: #eafbf0; }
.kd-stat-icon.returned { color: #ff3b30; background: #ffebeb; }
.kd-stat-item span { font-size: 0.75rem; color: #000; font-weight: 500; white-space: nowrap; }

.kd-badge {
    position: absolute; top: -4px; right: -4px;
    background: #ff3b30; color: white; font-size: 0.65rem;
    min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
    display: flex; justify-content: center; align-items: center; border: 2px solid #fff;
}

/* منو لیست */
.kd-menu-list ul { list-style: none; margin: 0; padding: 0; }
.kd-menu-list li { border-bottom: 1px solid var(--kd-border-color); }
.kd-menu-list li:last-child { border-bottom: none; }
.kd-menu-list a { display: flex; align-items: center; padding: 16px 20px; text-decoration: none; color: #000; font-weight: 500; font-size: 0.95rem; }
.kd-list-icon { width: 32px; height: 32px; background: #f2f2f7; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-left: 15px; font-size: 1rem; color: #000; }
.kd-logout-item .kd-list-text { color: #ff3b30; }
.kd-logout-item .kd-list-icon { background: #ffebeb; color: #ff3b30; }

/* اصلاح لیست‌های داخلی */
.woo-wallet-transactions-items li, table.shop_table tbody tr {
    box-shadow: none !important;
    border: 1px solid var(--kd-border-color) !important;
    background: #fff !important;
}

/* --- 6. FIX HEADER MENU (Added by Alireza) --- */
/* مخفی کردن کامل منوی کشویی قدیمی برای سبک شدن صفحه */
#dinaUmenu, 
.dina-user-menu, 
.dina-side-panel {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* تغییر ظاهر دکمه که کاربر بداند قابل کلیک است */
li.dina-nav-user-menu {
    cursor: pointer !important;
}
