/* J. Sam Distribution Dashboard - Professional Dark Theme */
:root {
    --jsam-bg: #121212;
    --jsam-card-bg: #181818;
    --jsam-card-hover: #282828;
    --jsam-text: #ffffff;
    --jsam-text-dim: #b3b3b3;
    --jsam-accent: #1db954; /* Spotify Green */
    --jsam-danger: #e91429;
    --jsam-border: #282828;
}

/* FIX: Ensure padding doesn't break width */
.jsam-dashboard-wrapper, 
.jsam-dashboard-wrapper * { 
    box-sizing: border-box; 
}

.jsam-dashboard-wrapper {
    background-color: var(--jsam-bg);
    color: var(--jsam-text);
    padding: 24px;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, sans-serif;
    max-width: 100%;
   overflow-x: auto; /* Allow proper mobile scrolling */
}

/* Header & Filters */
.jsam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.jsam-title h2 { margin: 0; font-size: 28px; font-weight: 800; color: #fff; }
.jsam-title p { margin: 5px 0 0; color: var(--jsam-text-dim); }

.jsam-date-controls {
    display: flex;
    gap: 10px;
    background: var(--jsam-card-bg);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--jsam-border);
    max-width: 100%;
}

.jsam-date-controls input {
    background: #2a2a2a;
    border: 1px solid #3e3e3e;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Grids */
/* FIX: Changed 280px to min(100%, 280px) to prevent screen breakout on small phones */
.jsam-grid-3 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.jsam-grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

@media (max-width: 992px) { .jsam-grid-2-1 { grid-template-columns: 1fr; } }

/* Cards */
.jsam-card {
    background: var(--jsam-card-bg);
    border: 1px solid var(--jsam-border);
    border-radius: 12px;
    padding: 24px;
    transition: background 0.3s ease;
    max-width: 100%;
}

.stat-card { display: flex; align-items: center; gap: 20px; }
.stat-icon { font-size: 32px; background: #2a2a2a; padding: 15px; border-radius: 12px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--jsam-accent); }

/* Wallet Card Special */
.wallet-card { background: linear-gradient(135deg, #1db954 0%, #191414 100%); border: none; }
.wallet-balance { font-size: 36px; font-weight: 800; margin: 15px 0; }
.wallet-subtext { color: rgba(255,255,255,0.85); font-size: 13px; line-height: 1.5; margin: 0 0 15px; }
.wallet-actions .jsam-btn { display: inline-block; text-decoration: none; text-align: center; }

/* Info alert (payout history panel) */
.jsam-alert { padding: 14px 16px; border-radius: 8px; font-size: 13.5px; line-height: 1.6; margin-bottom: 10px; }
.jsam-alert-info { background: rgba(29, 185, 84, 0.12); border: 1px solid rgba(29, 185, 84, 0.35); color: #dff7e7; }
.jsam-alert-warning { background: #2a2a2a; }
.jsam-alert-link { display: inline-block; margin-top: 6px; color: #1db954; font-weight: 700; text-decoration: none; }
.jsam-alert-link:hover { text-decoration: underline; }

/* Table */
/* FIX: Added min-width to trigger the slide */
.jsam-table-wrap { 
    overflow-x: auto; 
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
.jsam-table { 
    width: 100%; 
    min-width: 600px; 
    border-collapse: collapse; 
    margin-top: 15px; 
}

.jsam-table th { text-align: left; color: var(--jsam-text-dim); font-size: 12px; text-transform: uppercase; padding: 12px; border-bottom: 1px solid var(--jsam-border); }
.jsam-table td { padding: 12px; border-bottom: 1px solid var(--jsam-border); vertical-align: middle; }
.jsam-thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }

/* Status Badges */
.jsam-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-live { background: rgba(29, 185, 84, 0.2); color: #1db954; }
.status-pending { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.status-paid, .status-successful { background: rgba(29, 185, 84, 0.2); color: #1db954; }
.status-rejected, .status-failed { background: rgba(233, 20, 41, 0.2); color: #e91429; }

/* Buttons */
.jsam-btn { padding: 10px 20px; border-radius: 30px; border: none; font-weight: 700; cursor: pointer; transition: transform 0.2s; max-width: 100%; }
.jsam-btn:active { transform: scale(0.95); }
.jsam-btn-primary { background: var(--jsam-accent); color: #000; }
.jsam-btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }

/* Formidable Overrides for Dark Mode */
.jsam-withdrawal-form input, .jsam-withdrawal-form textarea {
    background: #2a2a2a !important; color: white !important; border: 1px solid #3e3e3e !important;
}

/* MOBILE FIXES */
@media (max-width: 600px) {
    .jsam-dashboard-wrapper { padding: 15px; }
    .jsam-title h2 { font-size: 22px; }
    .wallet-balance { font-size: 28px; }
    .jsam-header { flex-direction: column; align-items: flex-start; }
    .jsam-date-controls { width: 100%; flex-direction: column; }
}
/* === MOBILE OVERFLOW FIX (SAFE) === */
.jsam-dashboard-wrapper * {
    max-width: 100%;
}

.jsam-withdrawal-form input,
.jsam-withdrawal-form textarea {
    max-width: 100%;
}

/* ── JSI Distribute visual system ─────────────────────────────────── */
:root {
    --jsam-bg: #050505;
    --jsam-card-bg: #0d0d0f;
    --jsam-card-hover: #171326;
    --jsam-text: #f7f7f7;
    --jsam-text-dim: #aaa6b5;
    --jsam-accent: #8a6bff;
    --jsam-border: #26232f;
}
.jsam-dashboard-wrapper {
    background: #050505;
    border: 1px solid #1d1a25;
    border-radius: 16px;
    color: #f7f7f7;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}
.jsam-card,
.jsam-date-controls {
    background: #0d0d0f;
    border-color: #26232f;
}
.jsam-title h2 { font-size: 30px; letter-spacing: -.5px; }
.jsam-title p,
.stat-meta { color: #aaa6b5; }
.stat-icon { background: #171326; }
.stat-value { color: #b7a8ff; }
.wallet-card {
    background: radial-gradient(circle at 100% 0%, rgba(138,107,255,.3), transparent 48%), linear-gradient(135deg, #0d0d0f, #171228);
    border: 1px solid rgba(138,107,255,.5);
}
.jsam-alert-info { background: rgba(138,107,255,.1); border-color: rgba(138,107,255,.35); color: #d9d3ff; }
.jsam-alert-link { color: #b7a8ff; }
.jsam-date-controls input,
.jsam-withdrawal-form input,
.jsam-withdrawal-form textarea,
.jsam-withdrawal-form select {
    background: #09090b !important;
    border-color: #302b3e !important;
    color: #fff !important;
}
.jsam-btn-primary { background: linear-gradient(135deg, #9b83ff, #7047ed); color: #fff; }
.jsam-btn-outline { border-color: #8a6bff; color: #b7a8ff; }
.status-live,
.status-paid,
.status-successful { background: rgba(138,107,255,.16); color: #b7a8ff; }
.status-pending { background: rgba(245,195,66,.16); color: #f5c342; }