
/* ========================================= */
/* 1. สรุปบริการ (Summary Section)           */
/* ========================================= */

.dashboard-summary-container {
    /* p-4 bg-gray-800 rounded-lg shadow-inner */
    padding: 1.5rem;
    background-color: #1f2937; /* bg-gray-800 */
    border-radius: 0.5rem; /* rounded-lg */
    /* box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.6); */
}

.summary-title {
    /* text-2xl font-semibold mb-4 text-white */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 500; /* font-semibold */
    margin-bottom: 1rem; /* mb-4 */
    color: #ffffff; /* text-white */
    display: flex;
    align-items: center;
}

.summary-icon {
    /* mr-3 text-yellow-500 */
    margin-right: 0.75rem; /* mr-3 */
    color: #f59e0b; /* text-yellow-500 */
}

.summary-grid {
    /* grid grid-cols-2 gap-3 */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* grid-cols-2 */
    gap: 0.75rem; /* gap-3 */
}

@media (min-width: 768px) {
    .summary-title,
    .info-panel-title {
        font-size: 1.2rem !Important;
    }
	
	.summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
	
    .card-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-value {
        font-size: 1.2rem;
    }

    .card-detail {
        font-size: 0.7rem;
    }
	
}

@media (min-width: 1024px) { /* lg:grid-cols-3 */
    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); 
    }
}

@media (min-width: 1280px) { /* xl:grid-cols-6 */
    .summary-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)); 
    }
}

/* --- Card Styles (Base) --- */
.summary-card {
    /* p-3 rounded-lg shadow-md */
    padding: 0.75rem; /* p-3 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3); /* shadow-md */
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card[onclick] {
    cursor: pointer;
}

.card-title {
    /* text-lg font-medium text-white */
    font-size: 1.125rem; /* text-lg */
    font-weight: 500; /* font-medium */
    color: #ffffff; /* text-white */
}

.card-value {
    /* text-3xl font-bold mt-2 */
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    margin-top: 0.5rem; /* mt-2 */
}

.card-detail {
    /* text-sm mt-1 */
    font-size: 0.875rem;
    margin-top: 0.25rem; /* mt-1 */
}

/* --- Card Color Schemes (ใช้ Gradient ตามเดิม) --- */

.card-income-today {
    /* bg-gradient-to-br from-emerald-600 to-emerald-800 */
    background: linear-gradient(to bottom right, #059669, #065f46); 
}
.card-income-today .card-value {
    color: #6ee7b7; /* text-emerald-300 */
}
.card-income-today .card-detail {
    color: #a7f3d0; /* text-emerald-200 */
}

.card-income-total {
    /* bg-gradient-to-br from-green-600 to-green-800 */
    background: linear-gradient(to bottom right, #16a34a, #14532d); 
}
.card-income-total .card-value {
    color: #86efac; /* text-green-300 */
}
.card-income-total .card-detail {
    color: #bbf7d0; /* text-green-200 */
}

.card-credit-balance {
    /* bg-gradient-to-br from-purple-600 to-purple-800 */
    background: linear-gradient(to bottom right, #9333ea, #6b21a8); 
}
.card-credit-balance .card-value {
    color: #d8b4fe; /* text-purple-300 */
}
.card-credit-balance .card-detail {
    color: #e9d5ff; /* text-purple-200 */
}

.card-credit-used {
    /* bg-gradient-to-br from-blue-600 to-blue-800 */
    background: linear-gradient(to bottom right, #2563eb, #1e40af); 
}
.card-credit-used .card-value {
    color: #93c5fd; /* text-blue-300 */
}
.card-credit-used .card-detail {
    color: #bfdbfe; /* text-blue-200 */
}

.card-recharge-today {
    /* bg-gradient-to-br from-teal-600 to-teal-800 */
    background: linear-gradient(to bottom right, #0d9488, #115e59); 
}
.card-recharge-today .card-value {
    color: #5eead4; /* text-teal-300 */
}
.card-recharge-today .card-detail {
    color: #99f6e4; /* text-teal-200 */
}

.card-recharge-total {
    /* bg-gradient-to-br from-cyan-600 to-cyan-800 */
    background: linear-gradient(to bottom right, #0891b2, #155e75); 
}
.card-recharge-total .card-value {
    color: #67e8f9; /* text-cyan-300 */
}
.card-recharge-total .card-detail {
    color: #a5f3fc; /* text-cyan-200 */
}


/* ========================================= */
/* 2. ข้อมูลผู้ใช้และสถิติ (Info Section)    */
/* ========================================= */

.dashboard-info-grid {
    /* grid grid-cols-1 lg:grid-cols-2 gap-6 mt-6 */
    display: grid;
    grid-template-columns: 1fr; /* grid-cols-1 */
    gap: 0.6rem;
    margin-top: 0.6rem;
}

@media (min-width: 768px) {
    .dashboard-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) { /* lg:grid-cols-2 */
    .dashboard-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
    }
}

/* ส่วนของ "VIPx" ที่แสดงตรงข้ามกับ "ข้อมูลผู้ใช้งาน" */
/* ใช้ Flexbox เพื่อจัดเรียงชื่อหัวข้อและ VIP ให้อยู่คนละฝั่ง */
.info-panel-header {
    display: flex;
    justify-content: space-between; /* ดันซ้ายและขวา */
    align-items: center; /* จัดให้อยู่กึ่งกลางแนวตั้ง */
    width: 100%;
}

.title-left {
    display: flex;
    align-items: center;
}

/* Style สำหรับ VIP Status */
.vip-status-display {
    /* ปรับขนาดฟอนต์ให้ใหญ่ขึ้นสำหรับ Desktop */
    font-size: 1.125rem !important; 
    
    /* ปรับ Padding ให้เหมาะสมกับฟอนต์ขนาดใหญ่ (แทนค่าเดิม) */
    padding: 0.25rem 0.8rem !important;
    padding-top: 0.2rem !important; 
    
    /* คุณสมบัติอื่น ๆ ที่คงเดิม */
    border-radius: 9999px; 
    background-color: #ffd700; 
    color: #1f2937; 
    font-weight: 700; 
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    display: flex !important;
    align-items: center !important; 
}
.vip-status-display i,
.vip-status-display .vip-text {
    /* ทำให้ความสูงของบรรทัดเท่ากับขนาดฟอนต์ */
    line-height: 1 !important; 
}
/* ปรับระยะห่างของไอคอนให้เข้ากับขนาดฟอนต์ที่ใหญ่ขึ้น */
.vip-status-display i {
    margin-right: 0.3rem !important; /* เพิ่มระยะห่างเป็น 0.35rem */
}

/* --- Info Panel Base --- */
.user-info-panel, .usage-stats-panel {
    /* bg-gray-800 rounded-lg shadow-lg p-6 */
    background-color: #1f2937; /* bg-gray-800 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3); /* shadow-lg */
    padding: 1.5rem; /* p-6 */
}

.info-panel-title {
    /* text-2xl font-bold text-white mb-6 flex items-center */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 500; /* font-bold */
    color: #ffffff; /* text-white */
    margin-bottom: 1.5rem; /* mb-6 */
    display: flex;
    align-items: center;
}

.info-panel-icon-blue {
    /* mr-3 text-blue-400 */
    margin-right: 0.75rem; /* mr-3 */
    color: #60a5fa; /* text-blue-400 */
}

.info-panel-icon-green {
    /* mr-3 text-green-400 */
    margin-right: 0.75rem; /* mr-3 */
    color: #4ade80; /* text-green-400 */
}

.info-list {
    /* space-y-4 */
    display: flex;
    flex-direction: column;
    gap: 0.8rem; /* space-y-4 */
}

/* --- Info List Items (User Profile) --- */
.info-list-item {
    /* flex items-center justify-between p-3 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem; /* p-3 */
    background-color: #374151; /* bg-gray-700 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: background-color 0.2s; /* transition-colors */
}

.info-list-item:hover {
    background-color: #4b5563; /* hover:bg-gray-600 */
}

.info-item-left {
    /* flex items-center */
    display: flex;
    align-items: center;
}

.info-list-item i {
    /* mr-3 w-6 text-center */
    margin-right: 0.75rem; /* mr-3 */
    width: 1.5rem; /* w-6 */
    text-align: center;
}

.info-label {
    /* text-gray-300 */
    color: #d1d5db; /* text-gray-300 */
}

.info-value {
    /* text-white font-semibold */
    color: #ffffff; /* text-white */
    font-weight: 500; /* font-semibold */
    word-break: break-all; 
    text-align: right;
}

.info-value-sm {
   
    font-size: 0.875rem;
}

/* --- Info Icon Colors --- */
.info-icon-blue {
    color: #60a5fa; /* text-blue-400 */
}
.info-icon-green {
    color: #4ade80; /* text-green-400 */
}
.info-icon-yellow {
    color: #facc15; /* text-yellow-400 */
}
.info-icon-purple {
    color: #c084fc; /* text-purple-400 */
}
.info-icon-red {
    color: #f87171; /* text-red-400 */
}
.info-icon-teal {
    color: #2dd4bf; /* text-teal-400 */
}
.info-icon-orange {
    color: #fb923c; /* text-orange-400 */
}
.info-icon-indigo {
    color: #818cf8; /* text-indigo-400 */
}

/* --- Stat Items (Usage Stats) --- */
.stat-item {
    /* p-4 rounded-lg */
    padding: 1rem; /* p-4 */
    border-radius: 0.5rem; /* rounded-lg */
}

.stat-content {
    /* flex items-center justify-between */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-title {
    /* text-lg font-semibold text-white */
    font-size: 1.125rem; /* text-lg */
    font-weight: 500; /* font-semibold */
    color: #ffffff; /* text-white */
}

.stat-detail {
   
    font-size: 0.875rem;
}

.stat-count {
    /* text-2xl font-bold text-white */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    color: #ffffff; /* text-white */
}

.stat-unit {
   
    font-size: 0.875rem;
}

.stat-right {
    display: flex;
    flex-direction: column; 
    /* 👇 ใช้ align-items เพื่อจัดเรียงลูกๆ ให้อยู่ทางขวา */
    align-items: flex-end; /* หรือ align-items: end; */
}

/* --- Stat Color Schemes (ZS Pay Edition) --- */
/* --- Stat Color Schemes (ZS Pay Edition - ปรับปรุงตามโครงสร้างจริง) --- */

/* 1. รายการรายได้ (จำนวนครั้งที่ลูกค้าเติม) - โทนเขียว */
.stat-income-count {
    background: linear-gradient(to right, #16a34a, #14532d);
}
.stat-income-count .stat-detail,
.stat-income-count .stat-unit {
    color: #bbf7d0; 
}

/* 2. เติมเครดิต (ฝั่งเติมเข้า) - โทนน้ำเงิน */
.stat-recharge-count {
    background: linear-gradient(to right, #2563eb, #1e40af);
}
.stat-recharge-count .stat-detail,
.stat-recharge-count .stat-unit {
    color: #bfdbfe; 
}

/* 3. ค่าธรรมเนียม (รายการใช้งาน) - โทนส้ม/ทอง */
.stat-usage-count {
    background: linear-gradient(to right, #ea580c, #9a3412);
}
.stat-usage-count .stat-detail,
.stat-usage-count .stat-unit {
    color: #fed7aa; 
}

/* 4. ธุรกรรมรวม - โทนม่วง */
.stat-total-transaction {
    background: linear-gradient(to right, #9333ea, #6b21a8);
}
.stat-total-transaction .stat-detail,
.stat-total-transaction .stat-unit {
    color: #e9d5ff; 
}


/* สำหรับ "มือถือ" */
@media (max-width: 768px) { 
    /* ========================================= */
    /* 1. สรุปบริการ (Summary Section)           */
    /* ========================================= */

    .dashboard-summary-container {
        padding: 0.8rem;
    }

    .summary-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem; /* mb-3 (ลดจาก 1rem) */
    }

    .summary-icon {
        margin-right: 0.5rem;
    }

    .summary-grid {
        /* grid-cols-2 (ยังคงเดิมสำหรับมือถือ) */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .summary-card {
        padding: 0.65rem;
    }

    .card-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-value {
        font-size: 1.3rem; /* text-2xl (ลดจาก 1.875rem) */
        margin-top: 0.25rem; /* mt-1 (ลดจาก 0.5rem) */
    }

    .card-detail {
        font-size: 0.75rem; /* text-xs (ลดจาก 0.875rem) */
        margin-top: 0.125rem; /* mt-0.5 (ลดจาก 0.25rem) */
    }

    /* ========================================= */
    /* 2. ข้อมูลผู้ใช้และสถิติ (Info Section)    */
    /* ========================================= */

    .dashboard-info-grid {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
	.vip-status-display {
        padding: 0.2rem 0.6rem !Important;
    	font-size: 0.9rem !Important;
    }
    
    .user-info-panel, .usage-stats-panel {
        padding: 0.8rem;
    }

    .info-panel-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .info-panel-icon-blue, .info-panel-icon-green {
        margin-right: 0.5rem;
    }

    .info-list {
        gap: 0.5rem; /* space-y-3 (ลดจาก 1rem) */
    }

    /* --- Info List Items (User Profile) --- */
    .info-list-item {
        padding: 0.5rem;
		border-radius: 0.33rem;
    }

    .info-list-item i {
        margin-right: 0.5rem;
        width: 1.25rem; /* w-5 (ลดจาก 1.5rem) */
    }

    .info-label {
        font-size: 0.78rem;
    }

    .info-value {
        font-size: 0.78rem;
        font-weight: 500; /* font-medium (ลดจาก 600) */
        max-width: 80%; /* จำกัดความกว้างไม่ให้ทับ label */
    }

    .info-value-sm {
        font-size: 0.75rem; /* text-xs (ลดจาก 0.875rem) */
    }
    
    /* --- Stat Items (Usage Stats) --- */
    .stat-item {
        padding: 0.7rem;
    }

    .stat-title {
        font-size: 1rem;
    }

    .stat-detail {
        font-size: 0.75rem; /* text-xs (ลดจาก 0.875rem) */
    }

    .stat-count {
        font-size: 1.25rem;
    }

    .stat-unit {
        font-size: 0.75rem; /* text-xs (ลดจาก 0.875rem) */
    }
}
