/* --- RSGG Premium Dashboard CSS (v6.2 Unified) --- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.rsgg-dashboard-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    line-height: 1.6;
    box-sizing: border-box;
    padding: 0 10px;
}

/* =========================================
   1. GRID LAYOUTS
   ========================================= */
.rsgg-grid-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.rsgg-grid-main {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Column Layout */
    gap: 30px;
    align-items: start;
}

/* =========================================
   2. STAT CARDS (GRADIENTS & GLASS)
   ========================================= */
.rsgg-stat-card {
    padding: 30px;
    border-radius: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 140px;
    transition: transform 0.3s ease;
}

.rsgg-stat-card:hover {
    transform: translateY(-3px);
}

/* Decorative Circles */
.rsgg-stat-card::before {
    content: ''; position: absolute; top: -20px; right: -20px; width: 100px; height: 100px;
    background: rgba(255,255,255,0.15); border-radius: 50%;
}
.rsgg-stat-card::after {
    content: ''; position: absolute; bottom: -40px; left: -20px; width: 150px; height: 150px;
    background: rgba(255,255,255,0.08); border-radius: 50%;
}

.rsgg-stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.9;
    z-index: 2;
}

.rsgg-big-number {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2;
}
.rsgg-big-number small { font-size: 1.2rem; font-weight: 600; opacity: 0.8; }

.rsgg-stat-desc { font-size: 0.85rem; opacity: 0.85; z-index: 2; }

.rsgg-code-copy { cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.rsgg-code-copy:hover { opacity: 0.9; }

/* Gradients */
.rsgg-gradient-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.rsgg-gradient-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.rsgg-gradient-green { background: linear-gradient(135deg, #10b981, #059669); }

/* =========================================
   3. PANELS & CARDS (WHITE)
   ========================================= */
.rsgg-panel, .rsgg-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0; /* Slate 200 */
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.rsgg-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1e293b; /* Slate 800 */
    display: flex;
    align-items: center;
    gap: 10px;
}

.rsgg-card-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rsgg-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rsgg-card-body { padding: 30px; }

/* =========================================
   4. LEADERBOARD (DARK THEME)
   ========================================= */
.rsgg-leaderboard-panel {
    background: #1e293b; /* Slate 800 */
    color: #fff;
    border: none;
    padding: 0;
    overflow: hidden;
}

.rsgg-lb-header {
    padding: 25px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rsgg-lb-header h3 { margin: 0; font-size: 1.1rem; color: #fff; display: flex; align-items: center; gap: 8px; }
.rsgg-lb-dates { font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 20px; color: #94a3b8; }

.rsgg-lb-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}
/* Custom Scrollbar for LB */
.rsgg-lb-list::-webkit-scrollbar { width: 6px; }
.rsgg-lb-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.rsgg-lb-row {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.rsgg-lb-row:hover { background: rgba(255,255,255,0.1); transform: translateX(5px); }
.rsgg-lb-row.is-me { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.5); }

.rsgg-lb-rank { font-size: 1.2rem; width: 40px; text-align: center; font-weight: 700; }
.rsgg-lb-user { flex: 1; margin-left: 10px; }
.rsgg-lb-user strong { display: block; font-size: 0.95rem; font-weight: 600; }
.rsgg-lb-prize { font-size: 0.75rem; color: #fbbf24; font-weight: 600; display: block; margin-top: 4px; }
.rsgg-lb-score { font-weight: 700; color: #fff; background: rgba(0,0,0,0.3); padding: 6px 12px; border-radius: 8px; font-size: 0.9rem; }

/* Rank Specific Colors */
.rank-1 .rsgg-lb-user strong { color: #fbbf24; } /* Gold */
.rank-2 .rsgg-lb-user strong { color: #e2e8f0; } /* Silver */
.rank-3 .rsgg-lb-user strong { color: #d97706; } /* Bronze */

/* =========================================
   5. INPUTS & BUTTONS
   ========================================= */
.rsgg-copy-box {
    display: flex;
    gap: 10px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.rsgg-copy-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    outline: none;
    font-family: monospace;
    color: #334155;
    font-size: 1rem;
    width: 100%;
}
.rsgg-btn-copy {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    transition: 0.2s;
    font-size: 0.9rem;
}
.rsgg-btn-copy:hover { background: #f1f5f9; color: #0f172a; border-color: #94a3b8; }

.rsgg-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.rsgg-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

.rsgg-btn-small {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    height: 42px; /* To match input height */
}
.rsgg-btn-small:hover { background: #2563eb; }

/* Withdrawal Specific */
.rsgg-withdraw-card-wrapper input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.rsgg-link-input-group {
    display: flex; gap: 15px; background: #f8fafc; padding: 10px; border-radius: 12px; border: 1px solid #e2e8f0;
}
.rsgg-input-link, .rsgg-input, #rsgg-deep-url {
    width: 100%; padding: 14px 20px; font-size: 1rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #334155; outline: none; font-family: inherit; transition: all 0.2s;
}
.rsgg-input-link:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

.rsgg-btn {
    padding: 12px 25px; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; white-space: nowrap; justify-content: center;
}
.rsgg-btn-primary { background: #2563eb; color: #fff; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); }
.rsgg-btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3); }

/* =========================================
   6. TABLES & HISTORY (PREMIUM STYLE)
   ========================================= */
.rsgg-table-responsive { 
    width: 100%; 
    border-radius: 16px; 
    border: 1px solid #eef2f6; 
    overflow: hidden; 
}

.rsgg-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
}

/* Headers - დავმალოთ ზედმეტი ჰედერები, რადგან ახლა უფრო "List" სტილია */
.rsgg-table thead { display: none; } 

.rsgg-table tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.rsgg-table tr:last-child { border-bottom: none; }
.rsgg-table tr:hover { background: #f8fafc; }

.rsgg-table td { padding: 18px 25px; vertical-align: middle; }

/* Column 1: Icon & Info */
.rsgg-td-main { width: 60%; }
.rsgg-trans-wrapper { display: flex; align-items: center; gap: 15px; }

.rsgg-trans-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.bg-soft-green  { background: #dcfce7; color: #15803d; }
.bg-soft-red    { background: #fee2e2; color: #b91c1c; }
.bg-soft-orange { background: #ffedd5; color: #c2410c; }
.bg-soft-blue   { background: #dbeafe; color: #1e40af; }
.bg-soft-purple { background: #f3e8ff; color: #7e22ce; }
.bg-soft-gray   { background: #f1f5f9; color: #64748b; }

.rsgg-trans-info { display: flex; flex-direction: column; }
.rsgg-trans-title { font-weight: 700; color: #334155; font-size: 0.95rem; }
.rsgg-trans-desc { font-size: 0.8rem; color: #94a3b8; margin-top: 2px; }

/* Column 2: Status */
.rsgg-td-status { text-align: center; width: 20%; }

/* Column 3: Amount */
.rsgg-td-amount { text-align: right; width: 20%; }
.rsgg-td-amount strong { display: block; font-size: 1rem; }
.rsgg-td-amount small { font-size: 0.75rem; color: #94a3b8; }

.text-green { color: #15803d; }
.text-red { color: #b91c1c; }

/* Badges */
.rsgg-badge { 
    padding: 6px 12px; border-radius: 30px; 
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-block;
}
.rsgg-badge-success { background: #dcfce7; color: #15803d; }
.rsgg-badge-warning { background: #fff7ed; color: #9a3412; border: 1px solid #ffedd5; }
.rsgg-badge-danger  { background: #fee2e2; color: #b91c1c; }
.rsgg-badge-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.rsgg-badge-default { background: #f1f5f9; color: #475569; }

/* =========================================
   7. HEADER WALLET (WOODMART STYLE)
   ========================================= */
.rsgg-header-wallet {
    display: flex; align-items: center; gap: 6px;
    color: #333; text-decoration: none !important;
    font-weight: 600; font-size: 13px;
    padding: 0 5px; transition: all 0.2s ease;
    line-height: 1; cursor: pointer;
}
.rsgg-wallet-icon svg { width: 22px; height: 22px; display: block; color: inherit; }
.rsgg-wallet-price { font-family: inherit; position: relative; top: 1px; }
.rsgg-header-wallet:hover { color: #2271b1; opacity: 0.8; }
.rsgg-empty-state { display: none !important; }

/* =========================================
   8. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .rsgg-grid-main { grid-template-columns: 1fr; }
    .rsgg-stats-grid { grid-template-columns: 1fr; }
    
    .rsgg-link-input-group { flex-direction: column; }
    .rsgg-card-body > div { grid-template-columns: 1fr !important; }
    
    /* Mobile Table (Cards) */
    .rsgg-table tr {
        display: flex;
        flex-wrap: wrap;
        padding: 15px;
        position: relative;
        border-radius: 12px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        margin-bottom: 10px;
        border: 1px solid #eef2f6;
    }
    
    .rsgg-td-main { 
        width: 100%; 
        padding: 0 0 10px 0; 
        border: none; 
    }
    
    .rsgg-td-status { 
        width: auto; 
        padding: 0; border: none; 
        position: absolute; top: 15px; right: 15px; 
    }
    
    .rsgg-td-amount { 
        width: 100%; 
        padding: 0; border: none; 
        text-align: left; 
        display: flex; align-items: center; gap: 10px;
        margin-left: 57px; /* აიკონის ზომის გამოტოვება */
    }
    .rsgg-td-amount small { margin-left: auto; } /* თარიღი მარჯვნივ */
    
    /* მობილურზე ჰედერში აიკონის გასწორება */
    .rsgg-header-wallet .rsgg-wallet-price {
        font-size: 12px;
    }
}
/* --- COMPACT HISTORY STYLES --- */

/* მცირე ზომის სტრიქონები */
.rsgg-compact-history .rsgg-table td {
    padding: 10px 20px !important;
    font-size: 12px !important;
}

/* პატარა აიკონები */
.rsgg-compact-history .rsgg-trans-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
}

/* ტექსტების ზომები */
.rsgg-compact-history .rsgg-trans-title {
    font-size: 13px !important;
    margin-bottom: 2px;
}
.rsgg-compact-history .rsgg-trans-desc {
    font-size: 11px !important;
}

/* სტატუსის ბეჯი */
.rsgg-compact-history .rsgg-badge {
    padding: 2px 8px !important;
    font-size: 10px !important;
    border-radius: 6px !important;
}

/* თანხა */
.rsgg-compact-history .rsgg-td-amount strong {
    font-size: 13px !important;
}
.rsgg-compact-history .rsgg-td-amount small {
    font-size: 10px !important;
}

/* Pagination Buttons */
.rsgg-page-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: 0.2s;
}
.rsgg-page-btn:hover:not(:disabled) {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.rsgg-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}
.rsgg-page-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}