/* =========================================
   SUPERVISION LUXURY THEME
   (ใช้ร่วมกับ SB Admin 2 - Bootstrap 4)
   ========================================= */

:root {
    /* โทนสีหลัก (สีน้ำเงินไล่เฉด) */
    --primary-grad: linear-gradient(135deg, #4e73df 0%, #224abe 100%);

    /* แถบสีรุ้งตกแต่ง */
    --rainbow-grad: linear-gradient(90deg, #4e73df, #36b9cc, #f6c23e);

    /* เงาและการตกแต่ง */
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --card-radius: 20px;
    --hover-transform: translateY(-2px);
}

/* -----------------------------------------
   1. COMPONENTS: CARDS
   ----------------------------------------- */

/* การ์ดสีขาวทั่วไป (มีแถบสีด้านบน) */
.luxury-card {
    border: none;
    border-radius: var(--card-radius);
    background: #fff;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

/* แถบสีรุ้งคาดด้านบนการ์ด */
.luxury-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--rainbow-grad);
    z-index: 1;
}

.luxury-card-header {
    background: #fff;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.luxury-card-title {
    font-family: 'Sarabun', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Profile Header Card (สีน้ำเงิน) */
.profile-card {
    background: var(--primary-grad);
    color: white;
    border-radius: var(--card-radius);
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

/* ลายน้ำด้านหลัง Profile Card */
.profile-card-overlay {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 10rem;
    color: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
    pointer-events: none;
}

/* กล่องสถิติบน Profile Card */
.stat-box {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 15px;
    text-align: center;
    min-width: 100px;
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* -----------------------------------------
   2. COMPONENTS: IMAGES & AVATARS
   ----------------------------------------- */

/* รูป Profile ใหญ่ */
.avatar-lg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
    background-color: #fff;
}

/* รูปเล็กในตาราง */
.avatar-sm {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------
   3. COMPONENTS: TABLES
   ----------------------------------------- */

.luxury-table thead th {
    background: #f8f9fc;
    color: #475569;
    font-weight: 700;
    border-top: none;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
    white-space: nowrap;
}

.luxury-table tbody td {
    vertical-align: middle;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.luxury-table tbody tr:hover {
    background-color: #f8fafc;
}

/* -----------------------------------------
   4. COMPONENTS: INLINE EDIT
   ----------------------------------------- */

/* แถวที่กำลังแก้ไข (ไฮไลท์สีเหลืองอ่อน) */
.row-editing {
    background-color: #fff3cd !important;
    transition: background-color 0.3s;
}

/* Input Form ในตาราง */
.form-control-inline {
    height: 30px;
    padding: 2px 8px;
    font-size: 14px;
    width: 100%;
    min-width: 120px;
    border-radius: 4px;
    border: 1px solid #d1d3e2;
    background-color: #fff;
}

.form-control-inline:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* การสลับโหมด View/Edit */
.input-mode {
    display: none;
}

/* -----------------------------------------
   5. COMPONENTS: BUTTONS (HORIZONTAL)
   ----------------------------------------- */

/* จัดกลุ่มปุ่มให้อยู่แนวนอน กึ่งกลาง */
.action-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    /* ระยะห่างระหว่างปุ่ม */
}

/* ปุ่มวงกลม (สำหรับ Edit/Delete) */
.btn-circle-custom {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

.btn-circle-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-circle-custom.btn-warning {
    background-color: #f6c23e;
    color: #fff;
}

.btn-circle-custom.btn-danger {
    background-color: #e74a3b;
    color: #fff;
}

/* ปุ่มทรงรี (Pill) สำหรับ Save/Cancel */
.btn-pill-custom {
    border-radius: 50px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto !important;
    /* ห้ามยืดเต็ม */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-pill-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* ... (CSS เดิม: root, luxury-card, time-capsule ฯลฯ) ... */
.btn-luxury-nav {
    background: var(--primary-grad);
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.3);
    transition: all 0.3s ease;
}

.btn-luxury-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 115, 223, 0.4);
    filter: brightness(1.1);
}