/* ============================================================
   Member Admin Theme — ปรับ Sidebar + Header + การ์ด ของหน้าสมาชิก
   ให้เป็นโทนเดียวกับ Admin panel (slate / indigo)
   ใช้ร่วมกับ member-admin-theme.js (mark active menu ตาม URL)
   ============================================================ */
:root {
    --admin-slate-900: #0f172a;
    --admin-slate-800: #1e293b;
    --admin-slate-700: #334155;
    --admin-slate-400: #94a3b8;
    --admin-slate-300: #cbd5e1;
    --admin-indigo:    #4f46e5;
    --admin-indigo-h:  #4338ca;
}

/* ฟอนต์แบบ Admin panel */
body,
.sidebar,
.sidebar__menu,
.navbar-wrapper,
.dashboard-title-part .title {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans Thai", sans-serif;
}

/* ---- Sidebar พื้นเข้ม slate-900 ---- */
.sidebar,
.sidebar__inner { background: var(--admin-slate-900) !important; }
.sidebar__logo,
.sidebar-top-inner { background: transparent !important; }
.sidebar__logo {
    border-bottom: 1px solid var(--admin-slate-700);
    padding-bottom: 16px;
}

/* เมนูปกติ — ตัวหนังสือสีขาว */
.sidebar__menu .sidebar-menu-item > a {
    color: #ffffff !important;
    border-radius: 10px;
    margin: 2px 10px;
    padding: 12px 16px !important;
    transition: background .15s, color .15s;
}
.sidebar__menu .sidebar-menu-item > a .menu-title { color: #ffffff !important; }
.sidebar__menu .sidebar-menu-item > a .menu-icon { color: #ffffff !important; }

/* hover */
.sidebar__menu .sidebar-menu-item > a:hover {
    background: var(--admin-slate-800) !important;
    color: #fff !important;
}
.sidebar__menu .sidebar-menu-item > a:hover .menu-icon { color: #fff !important; }

/* active = indigo */
.sidebar__menu .sidebar-menu-item.active > a,
.sidebar__menu .sidebar-menu-item > a.active {
    background: var(--admin-indigo) !important;
    color: #fff !important;
}
.sidebar__menu .sidebar-menu-item.active > a .menu-icon,
.sidebar__menu .sidebar-menu-item > a.active .menu-icon { color: #fff !important; }

/* กล่อง Need Help */
.sidebar-support-box { border-radius: 14px; margin: 12px; overflow: hidden; }

/* ไอคอน hamburger / ปุ่มย่อ-ขยายเมนู บน sidebar ให้เป็นสีขาว */
.sidebar .navbar__expand,
.sidebar .sidebar-mobile-menu,
.sidebar .navbar__left button,
.sidebar__logo .navbar__left i,
.sidebar .navbar__expand i,
.sidebar .sidebar-mobile-menu i {
    color: #ffffff !important;
}

/* ---- Header bar — gradient 2 สี (น้ำเงิน -> indigo) แบบ Admin ---- */
.navbar-wrapper {
    background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%) !important;
    box-shadow: 0 2px 8px rgba(79,70,229,.18);
}
.navbar-wrapper-area { background: transparent !important; }
.dashboard-title-part .title { color: #ffffff !important; font-weight: 700; }
/* ชื่อผู้ใช้ + ไอคอน ในแถบ header เป็นสีขาว */
.navbar-wrapper .navbar-user__name { color: #ffffff !important; font-weight: 600; }
.navbar-wrapper .navbar-user .icon i { color: #ffffff !important; }
.navbar-wrapper .navbar__action-list > li > button { color: #ffffff !important; }
/* กล่องเลือกภาษา/ปุ่มใน header ให้โปร่งบนพื้น gradient */
.navbar-wrapper .lang-switch,
.navbar-wrapper select {
    background: rgba(255,255,255,.15) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.3) !important;
}
/* เมนู dropdown เลือกภาษา (English / ภาษาไทย) — ตัวหนังสือสีดำบนพื้นขาว (รวม hover) */
.app-lang-switch div span,
.app-lang-switch div:hover span,
.app-lang-switch *:hover span { color: #1a1a1a !important; }

/* ---- การ์ด / กราฟ / ตาราง ---- */
.dash-card,
.chart-bg,
.list-card,
.card,
.custom-table-wrapper {
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15,23,42,.08) !important;
}
.dash-card .title { color: #64748b !important; }
.dash-card .content { color: #0f172a !important; font-weight: 700; }

/* ---- สีไอคอนการ์ดแยกตามความหมาย (เหมือน Admin) ---- */
.dash-card .icon {
    background: #eef2ff !important;       /* ค่าเริ่มต้น (indigo อ่อน) */
    color: var(--admin-indigo) !important;
}
.dash-card .icon i { color: inherit !important; }

/* เขียว — เงิน/ยอดซื้อ */
.dash-card.dc-green  .icon { background:#dcfce7 !important; color:#16a34a !important; }
/* indigo — USDT รับแล้ว */
.dash-card.dc-indigo .icon { background:#eef2ff !important; color:#4f46e5 !important; }
/* amber — รอดำเนินการ */
.dash-card.dc-amber  .icon { background:#fef3c7 !important; color:#d97706 !important; }
/* blue — คำสั่งซื้อทั้งหมด */
.dash-card.dc-blue   .icon { background:#dbeafe !important; color:#2563eb !important; }
/* purple — กระเป๋าเงิน */
.dash-card.dc-purple .icon { background:#f3e8ff !important; color:#9333ea !important; }
/* teal — KYC */
.dash-card.dc-teal   .icon { background:#ccfbf1 !important; color:#0d9488 !important; }
/* cyan — stock */
.dash-card.dc-cyan   .icon { background:#cffafe !important; color:#0891b2 !important; }
/* rose — เรท */
.dash-card.dc-rose   .icon { background:#ffe4e6 !important; color:#e11d48 !important; }

/* หัวตาราง / หัวข้อ section */
.header-title-list h4,
.dashboard-title-part h5 { color: #1e293b !important; font-weight: 700; }

/* ---- ปุ่มหลัก ให้เป็น indigo เหมือน Admin ---- */
.btn--base {
    background: var(--admin-indigo) !important;
    border-color: var(--admin-indigo) !important;
    color: #fff !important;
}
.btn--base:hover {
    background: var(--admin-indigo-h) !important;
    border-color: var(--admin-indigo-h) !important;
}

/* badge สถานะให้โค้งมนแบบ Admin */
.badge { border-radius: 9999px; font-weight: 600; }

/* ปุ่ม "สั่งซื้อสำเร็จ" สีเขียว (ชนะ .btn--base ของธีม) */
.btn.sr-success-btn,
.btn--base.sr-success-btn {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
    font-weight: 600 !important;
}

/* ช่องกรอกข้อความในหน้าสมาชิก: ตัวอักษรสีดำเข้มบนพื้นขาวเสมอ
   (กันค่าที่บันทึกในระบบแสดงเป็นสีขาวมองไม่เห็น) */
.form--control,
input.form--control,
input[type="text"].form--control,
input[type="number"].form--control,
input[type="email"].form--control,
input[type="tel"].form--control,
input[type="password"].form--control,
textarea.form--control,
select.form--control {
    color: #0f172a !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #0f172a !important;
}
.form--control::placeholder { color: #94a3b8 !important; -webkit-text-fill-color: #94a3b8 !important; }
/* ช่องในกล่อง modal (popup แก้ที่อยู่กระเป๋า / OTP) */
.modal-body .form--control,
.modal-content input,
.modal-content textarea,
.modal-content select {
    color: #0f172a !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #0f172a !important;
}
