/*
Theme Name: SMM Panel Flatsome Child
Description: Theme tối ưu riêng cho hệ thống dịch vụ SMM Panel.
Author: Gemini Expert
Template: flatsome
Version: 1.0.0
*/

:root {
    --primary-color: #0061ff;
    --secondary-color: #60e3ff;
    --bg-dashboard: #f4f7fe;
    --text-main: #2d3748;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body { font-family: "Be Vietnam Pro", Arial, sans-serif; color: var(--text-main); background-color: #fff; }

/* ========================================================= */
/* 1. DASHBOARD LAYOUT CHUNG */
/* ========================================================= */
#smm-dashboard-wrapper { display: flex; min-height: 100vh; background: var(--bg-dashboard); }
.smm-sidebar { width: 260px; background: #fff; padding: 20px; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; }
.sidebar-user { padding: 20px 0; text-align: center; border-bottom: 1px solid #edf2f7; margin-bottom: 20px; }
.user-avatar img { border-radius: 50%; margin-bottom: 10px; }
.user-name { font-weight: bold; margin: 0; }
.user-balance span { color: var(--primary-color); font-weight: bold; }

.sidebar-nav .nav-item { display: flex; align-items: center; padding: 12px 15px; color: #718096; text-decoration: none; border-radius: var(--border-radius); margin-bottom: 5px; transition: 0.3s; }
.sidebar-nav .nav-item i { margin-right: 10px; width: 20px; text-align: center; }
.sidebar-nav .nav-item:hover, .sidebar-nav .nav-item.active { background: var(--primary-color); color: #fff; }
.sidebar-nav .nav-item:hover i, .sidebar-nav .nav-item.active i { color: #fff !important; }

.smm-main-content { flex: 1; padding: 30px; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

/* Khối Thống kê */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; padding: 20px; border-radius: var(--border-radius); box-shadow: var(--card-shadow); border-left: 4px solid var(--primary-color); }
.stat-card h3 { margin: 10px 0 0 0; color: var(--primary-color); font-size: 24px;}

/* ========================================================= */
/* 2. FORM ĐẶT ĐƠN (ORDER FORM) */
/* ========================================================= */
.smm-order-container { display: grid; grid-template-columns: 1.5fr 1fr; gap: 25px; align-items: start; }
.order-form-box, .order-info-box { background: #fff; padding: 25px; border-radius: var(--border-radius); box-shadow: var(--card-shadow); }
.box-title { font-size: 18px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #edf2f7; display: flex; align-items: center; gap: 10px; }

.smm-field { margin-bottom: 20px; }
.smm-field label { display: block; font-weight: 600; margin-bottom: 12px; font-size: 14px; color: #2d3748; }
.smm-field select, .smm-field input { width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 15px; box-sizing: border-box; height: 48px; line-height: normal; background: #fff;}
.smm-field input[type="number"]::-webkit-outer-spin-button, .smm-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.smm-field input[type="number"] { -moz-appearance: textfield; }

.smm-price-summary { background: #f8fafc; padding: 15px; border-radius: 10px; margin-bottom: 20px; border: 1px solid #e2e8f0;}
.price-item { display: flex; justify-content: space-between; margin-bottom: 5px; }
.price-item.total { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #cbd5e0; font-size: 18px; }
.price-item.total strong { color: #e53e3e; font-size: 22px; }

.smm-btn-submit { width: 100%; background: var(--primary-color); color: #fff; padding: 16px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s;}
.smm-btn-submit:hover { background: #0050d2; }

/* ========================================================= */
/* 3. LỊCH SỬ ĐƠN HÀNG (HISTORY TABLE) */
/* ========================================================= */
.smm-history-container { background: #fff; padding: 25px; border-radius: var(--border-radius); box-shadow: var(--card-shadow); }
.table-responsive { overflow-x: auto; }
.smm-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.smm-table th, .smm-table td { padding: 15px; border-bottom: 1px solid #edf2f7; }
.smm-table th { background: #f8fafc; color: #4a5568; font-weight: 600; white-space: nowrap; }
.smm-table tbody tr:hover { background: #f8fafc; }
.link-cell a { color: var(--primary-color); text-decoration: none; background: #ebf8ff; padding: 5px 10px; border-radius: 5px; font-size: 12px; white-space: nowrap; }
.price-cell { font-weight: bold; color: #e53e3e; }

.smm-status { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; white-space: nowrap; }
.status-pending { background: #feebc8; color: #dd6b20; }
.status-processing { background: #bee3f8; color: #3182ce; }
.status-completed { background: #c6f6d5; color: #38a169; }
.status-canceled { background: #fed7d7; color: #e53e3e; }

.platform-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; color: #fff; margin-right: 5px; }
.platform-fb { background: #1877f2; }
.platform-ig { background: #e1306c; }
.platform-tt { background: #000000; }

/* ========================================================= */
/* 4. HIỆU ỨNG RUNG LẮC (SHAKE ICON) */
/* ========================================================= */
@keyframes smm-icon-shake {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(-20deg); }
    20% { transform: rotate(20deg); }
    30% { transform: rotate(-20deg); }
    40% { transform: rotate(20deg); }
    50% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}
.shake-icon {
    display: inline-block !important; 
    transform-origin: center center !important; 
    animation: smm-icon-shake 2s infinite ease-in-out !important;
}

/* ========================================================= */
/* 5. RESPONSIVE (MOBILE) */
/* ========================================================= */
.smm-mobile-nav { display: none; }
@media (max-width: 992px) { 
    .smm-order-container { grid-template-columns: 1fr; } 
}
@media (max-width: 768px) {
    .smm-sidebar { display: none; }
    #smm-dashboard-wrapper { padding-bottom: 70px; }
    .smm-mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; height: 60px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); justify-content: space-around; align-items: center; z-index: 999; }
    .mob-nav-item { color: #718096; font-size: 24px; }
    .mob-nav-item.active { color: var(--primary-color); }
    .smm-main-content { padding: 15px; }
    .smm-history-container { padding: 15px; }
}

/* ========================================================= */
/* 6. DARK MODE */
/* ========================================================= */
[data-theme="dark"] #smm-dashboard-wrapper { background: #1a202c; color: #e2e8f0; }
[data-theme="dark"] .smm-sidebar, [data-theme="dark"] .stat-card, [data-theme="dark"] .order-form-box, [data-theme="dark"] .order-info-box, [data-theme="dark"] .smm-mobile-nav, [data-theme="dark"] .smm-history-container { background: #2d3748; border-color: #4a5568; color: #fff; }
[data-theme="dark"] .smm-field select, [data-theme="dark"] .smm-field input, [data-theme="dark"] .smm-price-summary { background: #1a202c; border-color: #4a5568; color: #fff; }
[data-theme="dark"] .smm-table th { background: #1a202c; color: #a0aec0; border-bottom-color: #4a5568; }
[data-theme="dark"] .smm-table td { border-bottom-color: #4a5568; color: #e2e8f0; }
[data-theme="dark"] .smm-table tbody tr:hover { background: #1a202c; }
[data-theme="dark"] .link-cell a { background: #1a202c; color: #60e3ff; }
[data-theme="dark"] .status-pending { background: rgba(221, 107, 32, 0.2); color: #fbd38d; }
/* ========================================================= */
/* TRUM SERVER CARDS & 4 BOXES GRID STYLES */
/* ========================================================= */
.server-list-container { max-height: 350px; overflow-y: auto; border: 1px solid #edf2f7; border-radius: 8px; background: #fff; margin-bottom: 15px; }
.server-card-item { display: flex; align-items: flex-start; padding: 12px 15px; border-bottom: 1px solid #edf2f7; cursor: pointer; transition: 0.2s; margin: 0; }
.server-card-item:last-child { border-bottom: none; }
.server-card-item:hover { background: #f8fafc; }
.server-card-item.active { background: #ebf8ff; border-left: 3px solid var(--primary-color); }

.sc-radio { margin-right: 12px; margin-top: 2px; }
.sc-radio input { width: 18px; height: 18px; cursor: pointer; margin: 0; accent-color: var(--primary-color); }

.sc-info { flex: 1; }
.sc-name { font-size: 14px; font-weight: 500; color: #2d3748; margin-bottom: 6px; line-height: 1.4; }
.sc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-price { color: #e53e3e; font-weight: bold; font-size: 14px; }
.sc-badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.sc-stable { background: #c6f6d5; color: #22543d; border: 1px solid #9ae6b4; }
.sc-detail { background: #e2e8f0; color: #4a5568; border: 1px solid #cbd5e0; }

/* 4 BOXES GRID */
.server-details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.sd-box { background: #f8fafc; border: 1px solid #edf2f7; border-radius: 8px; padding: 12px 10px; text-align: center; }
.sd-label { display: block; font-size: 12px; color: #718096; margin-bottom: 5px; }
.sd-value { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; font-weight: 600; }
.sd-green { color: #38a169; }
.sd-red { color: #e53e3e; }
/* ========================================================= */
/* BỘ CSS "LỘT XÁC" LÀM MỀM MẠI GIAO DIỆN CHUẨN APP
/* ========================================================= */

/* 1. Thay đổi Font chữ toàn cục (Đã sửa lỗi ép Font làm mất Icon) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

#smm-dashboard-wrapper {
    font-family: 'Inter', sans-serif;
}

/* Áp dụng font Inter cho toàn bộ chữ, nhưng TRỪ các thẻ Icon (<i> và dashicons) ra */
#smm-dashboard-wrapper *:not(i):not(.dashicons) {
    font-family: 'Inter', sans-serif;
}

/* 2. Bo tròn và Đổ bóng các Khối (Cards) mềm như mây */
.smm-custom-block, .premium-card, .bank-card, .rank-card, .order-form-box {
    border-radius: 20px !important; /* Bo góc to hơn */
    border: none !important; /* Xóa viền cứng */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.06) !important; /* Bóng đổ mịn và tản ra xa */
    transition: all 0.3s ease;
}

/* 3. Hiệu ứng Hover cho các thẻ Sản phẩm (Nổi lên mượt mà) */
.premium-card:hover, .social-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 97, 255, 0.15) !important;
}

/* 4. Làm mềm các ô Input / Select (Nhập dữ liệu) */
.smm-field input, .smm-field select, textarea {
    border-radius: 14px !important;
    padding: 14px 18px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.02) !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}
.smm-field input:focus, .smm-field select:focus, textarea:focus {
    border-color: #0061ff !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(0, 97, 255, 0.15) !important; /* Viền sáng khi bấm vào */
}

/* 5. Nút bấm (Button) hình viên thuốc (Pill), màu Gradient */
.smm-btn-submit, .pc-btn, .smm-modal-btn {
    border-radius: 50px !important; /* Nút tròn hẳn ở 2 đầu */
    background: linear-gradient(135deg, #0061ff 0%, #60efff 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 97, 255, 0.3) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.smm-btn-submit:hover, .pc-btn:hover, .smm-modal-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 97, 255, 0.4) !important;
}

/* 6. Danh sách Server (Trumlike Style) gọn gàng hơn */
.server-list-container {
    border-radius: 16px !important;
    border: 1px solid #edf2f7 !important;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}
.server-card-item.active {
    background: #ebf8ff !important;
    border-left: 4px solid #0061ff !important;
    border-radius: 8px; /* Bo góc khi được chọn */
}

/* 7. Modal (Popup) mượt mà hơn */
.smm-modal-content {
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}
.smm-variant-item {
    border-radius: 14px !important;
}

/* 8. Thanh Menu đáy (Mobile Navigation) lơ lửng */
@media (max-width: 768px) {
    .smm-mobile-nav {
        border-radius: 30px !important; /* Bo tròn thanh nav */
        bottom: 15px !important; /* Cho lơ lửng cách đáy màn hình */
        width: 90% !important;
        left: 5% !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        padding: 8px 0 !important;
    }
    .smm-main-content {
        padding-bottom: 100px !important; /* Tránh bị che mất nội dung */
    }
}