@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@400;700&display=swap');

/* Font ຫຼັກ */
body,
.elementor,
.clinic-dashboard-wrapper {
    font-family: 'Noto Sans Lao', sans-serif !important;
    background-color: #f8f9fe;
    /* ສີພື້ນຫຼັງແບບອ່ອນໆ */
}

/* ===========================
   1. STATS CARDS (ກ່ອງ 4 ສີ)
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    border-radius: 15px;
    color: #333;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

/* ສີພື້ນຫຼັງແຕ່ລະກ່ອງ */
.stat-card.blue {
    background-color: #e3f2fd;
    color: #1565c0;
}

.stat-card.green {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.stat-card.yellow {
    background-color: #fffde7;
    color: #f9a825;
}

.stat-card.purple {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.stat-amount {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 10px;
}

/* ===========================
   2. MIDDLE SECTION (ກຣາຟ + ນັດໝາຍ)
   =========================== */
.dashboard-middle {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* ກຣາຟກວ້າງ 2 ສ່ວນ, ນັດໝາຍ 1 ສ່ວນ */
    gap: 20px;
    margin-bottom: 30px;
}

/* ມືຖືໃຫ້ລຽນລົງລຸ່ມ */
@media (max-width: 768px) {
    .dashboard-middle {
        grid-template-columns: 1fr;
    }
}

.chart-box,
.appointment-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.section-subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

/* Appointment List Items */
.appt-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.appt-item:last-child {
    border-bottom: none;
}

.appt-avatar {
    width: 45px;
    height: 45px;
    background: #eee;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.appt-info {
    flex-grow: 1;
}

.appt-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.appt-treatment {
    font-size: 12px;
    color: #666;
}

.appt-time {
    text-align: right;
    min-width: 80px;
}

.time-text {
    font-weight: 700;
    font-size: 14px;
    display: block;
}

.status-badge {
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    display: inline-block;
    margin-top: 4px;
}

.status-badge.green {
    background: #d4edda;
    color: #155724;
}

/* CSS ສ້າງກຣາຟແທ່ງແບບຈຳລອງ (Bar Chart CSS) */
.fake-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.bar {
    width: 12px;
    border-radius: 10px 10px 0 0;
    position: relative;
    transition: height 0.5s;
}

.bar.income {
    background-color: #0073aa;
    margin-right: 4px;
}

.bar.expense {
    background-color: #ff5252;
}

.bar-label {
    font-size: 10px;
    color: #999;
    margin-top: 5px;
}

/* ===========================
   3. TABLE STYLES
   =========================== */
.clinic-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.clinic-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 700;
    padding: 15px;
    text-align: left;
}

.clinic-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.clinic-table tr:hover {
    background: #f9f9f9;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-delete {
    background: #dc3545;
}

.btn-add {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}