/*
Theme Name: Astra Child
Template: astra
*/

/* ===============================
   BUTTON BASE (CHUNG)
================================ */
.btn-logout,
.btn-delete,
.btn-confirm,
.btn-change-password {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    border: none;
}

/* LOGOUT */
a.btn-logout {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff !important;
}

a.btn-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13,110,253,.35);
}

/* DELETE */
.btn-delete {
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
    color: #fff;
}

.btn-delete:hover {
    box-shadow: 0 6px 16px rgba(220,53,69,.35);
}

/* CONFIRM / CANCEL */
.btn-confirm {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
}

.btn-cancel {
    background: #e9ecef;
    color: #333;
}

/* ===============================
   ADMIN LINK DASHBOARD (GIỮ NGUYÊN)
================================ */
.admin-link-dashboard .dashboard-cards {
    display: flex;
    gap: 20px;
}

.admin-link-dashboard .card {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

/* ===============================
   USER DASHBOARD – FINAL (ỔN ĐỊNH)
================================ */
.user-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 10px 40px;
}

/* Xin chào */
.user-dashboard .user-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ===============================
   WALLET – CARD STYLE (ĐỒNG BỘ)
================================ */
.user-dashboard .user-wallet {
    display: block;
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    margin: 15px 0 30px;
    max-width: 420px;

    /* card style giống 2 card kia */
    border-left: 6px solid #0d6efd;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);

    font-size: 26px;
    font-weight: 700;
    color: #212529;
}

/* label */
.user-dashboard .user-wallet strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px;
}

/* ===============================
   CARD GRID
================================ */
.user-dashboard .dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 35px;
}

.user-dashboard .card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transition: transform .25s ease;
}

.user-dashboard .card:hover {
    transform: translateY(-4px);
}

.user-dashboard .card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 10px;
}

.user-dashboard .card p {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

/* Card màu */
.user-dashboard .card:nth-child(1) {
    border-left: 6px solid #dc3545;
}

.user-dashboard .card:nth-child(2) {
    border-left: 6px solid #198754;
}

/* ===============================
   LỊCH SỬ
================================ */
.user-dashboard h3 {
    font-size: 20px;
    margin: 35px 0 15px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.dashboard-table th,
.dashboard-table td {
    padding: 14px 16px;
}

.dashboard-table thead {
    background: #f5f7fa;
}

.dashboard-table tr:nth-child(even) {
    background: #fafafa;
}

/* Khi chưa có giao dịch */
.user-dashboard h3 + p {
    background: #ffffff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    color: #888;
    font-style: italic;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .user-dashboard .user-wallet {
        max-width: 100%;
        font-size: 22px;
    }
}
.nap-tien-form {
    max-width: 420px;
    margin: 40px auto;
    padding: 25px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
}

.nap-tien-form h2 {
    text-align: center;
    margin-bottom: 20px;
}

.nap-tien-form label {
    font-weight: 600;
    margin-top: 12px;
    display: block;
}

.nap-tien-form input {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.nap-tien-form button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: linear-gradient(135deg,#0d6efd,#0b5ed7);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.user-wallet {
    display: none;
}
.site-title a {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 99;
}
/* ===================================================
   ASTRA MOBILE ACCOUNT MENU – HIDE ITEMS BY URL
   (CHUẨN – ĂN 100%)
=================================================== */
@media (max-width: 921px) {

    /* Ẩn menu ADMIN với user thường */
    body:not(.role-administrator) .ast-mobile-popup-content a[href*="user-list"],
    body:not(.role-administrator) .ast-mobile-popup-content a[href*="thung-rac"],
    body:not(.role-administrator) .ast-mobile-popup-content a[href*="quan-ly-phuong-thuc-nap-tien"],
    body:not(.role-administrator) .ast-mobile-popup-content a[href*="don-nap-tien"] {
        display: none !important;
    }

    /* Đã đăng nhập → ẩn đăng ký / đăng nhập */
    body.logged-in .ast-mobile-popup-content a[href*="dang-ky"],
    body.logged-in .ast-mobile-popup-content a[href*="dang-nhap"] {
        display: none !important;
    }

    /* Chưa đăng nhập → ẩn menu user */
    body:not(.logged-in) .ast-mobile-popup-content a[href*="tai-khoan"],
    body:not(.logged-in) .ast-mobile-popup-content a[href*="nap-tien"],
    body:not(.logged-in) .ast-mobile-popup-content a[href*="tin-nhan"] {
        display: none !important;
    }

}
