/* ============================================
   REVAMP TRADE FACILITATORS v0.2.0
   Complete CSS - Unified with Revamp design system
   ============================================ */

/* ===== Hide dashboard widgets on facilitator pages ===== */
body.rtf-facilitator-page .dashboard-content .rtf-wrap ~ *,
body.rtf-user-facilitator-page .dashboard-content .rtf-wrap ~ * {
    display: none !important;
}

body.rtf-facilitator-page .dashboard-content .rtf-wrap ~ .row,
body.rtf-user-facilitator-page .dashboard-content .rtf-wrap ~ .row {
    display: none !important;
}

/* ===== Base Styles ===== */
.rtf-wrap,
.rtf-admin .rtf-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin: 18px 0;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    width: 100%;
    box-sizing: border-box;
}

.rtf-wallet-header {
    padding: 0 0 16px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.rtf-wallet-header h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
}

.rtf-wallet-eyebrow {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

/* ===== Cards ===== */
.rtf-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.rtf-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    transition: all 0.2s ease;
}

.rtf-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rtf-card span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rtf-card strong {
    display: block;
    font-size: 22px;
    color: #111827;
    margin-top: 6px;
}

/* ===== Box ===== */
.rtf-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    margin: 0 0 16px 0;
    box-sizing: border-box;
}

.rtf-box h3 {
    margin-top: 0;
    color: #111827;
    font-size: 18px;
}

/* ===== Grid ===== */
.rtf-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* ===== Tabs ===== */
.rtf-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 20px 0;
}

.rtf-tabs a {
    padding: 10px 18px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    text-decoration: none;
    color: #111827;
    background: #f9fafb;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rtf-tabs a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.rtf-tabs a.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.rtf-tabs a.active:hover {
    background: #1f2937;
}

/* ===== Badge ===== */
.rtf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.rtf-tabs a.active .rtf-badge {
    background: #fff;
    color: #111827;
}

/* ===== Filters ===== */
.rtf-filterbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    margin: 0 0 16px 0 !important;
}

.rtf-filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.rtf-filterbar input[type="search"] {
    width: auto !important;
    min-width: 160px !important;
    max-width: 240px !important;
    height: 38px !important;
    line-height: 1.4 !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    font-weight: 400 !important;
}

.rtf-filterbar input[type="search"]:focus {
    border-color: #111827 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1) !important;
}

.rtf-filterbar select {
    width: auto !important;
    min-width: 150px !important;
    max-width: 200px !important;
    height: 38px !important;
    line-height: 1.4 !important;
    padding: 6px 30px 6px 12px !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    font-weight: 400 !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
}

/* ===== Bulk Bar ===== */
.rtf-bulkbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 10px 0 !important;
    margin: 0 0 12px 0 !important;
}

.rtf-bulkbar select {
    width: auto !important;
    min-width: 160px !important;
    max-width: 220px !important;
    height: 38px !important;
    line-height: 1.4 !important;
    padding: 6px 30px 6px 12px !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    font-weight: 400 !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
}

.rtf-bulkbar input[type="text"] {
    flex: 1 1 280px !important;
    min-width: 180px !important;
    max-width: none !important;
    height: 38px !important;
    line-height: 1.4 !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    font-weight: 400 !important;
}

/* ===== Buttons ===== */
.rtf-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #111827 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 9px 20px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    line-height: 1.4 !important;
    height: 38px !important;
    min-height: 38px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.rtf-btn:hover {
    background: #1f2937 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15) !important;
    color: #fff !important;
}

.rtf-btn.small {
    font-size: 13px !important;
    padding: 6px 14px !important;
    height: 32px !important;
    min-height: 32px !important;
}

.rtf-btn.secondary {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.rtf-btn.secondary:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

/* ===== Tables ===== */
.rtf-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    margin: 12px 0;
}

.rtf-table th,
.rtf-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.rtf-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.rtf-table tr:hover td {
    background: #fafafa;
}

/* ===== Checkboxes ===== */
.rtf-wrap input[type="checkbox"],
.rtf-admin input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 0 8px 0 0 !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    accent-color: #111827;
}

/* ===== Forms ===== */
.rtf-wrap label,
.rtf-admin label {
    display: block;
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    margin-bottom: 4px;
}

.rtf-wrap input[type="text"],
.rtf-wrap input[type="email"],
.rtf-wrap input[type="number"],
.rtf-wrap input[type="search"],
.rtf-wrap input[type="url"],
.rtf-wrap select,
.rtf-wrap textarea,
.rtf-admin input[type="text"],
.rtf-admin input[type="email"],
.rtf-admin input[type="number"],
.rtf-admin input[type="search"],
.rtf-admin input[type="url"],
.rtf-admin select,
.rtf-admin textarea {
    width: 100% !important;
    /*max-width: 100% !important;*/
    height: 42px !important;
    line-height: 1.4 !important;
    padding: 8px 12px !important;
    margin: 4px 0 0 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    display: block !important;
    font-weight: 400 !important;
    transition: border-color 0.2s ease;
}

.rtf-wrap input[type="text"]:focus,
.rtf-wrap input[type="email"]:focus,
.rtf-wrap input[type="number"]:focus,
.rtf-wrap input[type="search"]:focus,
.rtf-wrap select:focus,
.rtf-wrap textarea:focus,
.rtf-admin input[type="text"]:focus,
.rtf-admin input[type="email"]:focus,
.rtf-admin input[type="number"]:focus,
.rtf-admin input[type="search"]:focus,
.rtf-admin select:focus,
.rtf-admin textarea:focus {
    border-color: #111827 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1) !important;
}

.rtf-wrap textarea,
.rtf-admin textarea {
    min-height: 80px !important;
    height: auto !important;
    resize: vertical;
}

.rtf-wrap select,
.rtf-admin select {
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    padding-right: 30px !important;
}

/* ===== Status Badges ===== */
.rtf-status {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 12px;
    background: #f0f0f1;
    font-size: 12px;
    font-weight: 600;
}

.rtf-status--pending,
.rtf-status--draft {
    background: #fef3c7;
    color: #92400e;
}

.rtf-status--approved,
.rtf-status--publish,
.rtf-status--paid {
    background: #d1fae5;
    color: #065f46;
}

.rtf-status--rejected {
    background: #fee2e2;
    color: #991b1b;
}

.rtf-status--active,
.rtf-status--available {
    background: #dbeafe;
    color: #175cd3;
}

.rtf-status--suspended {
    background: #f3f4f6;
    color: #6b7280;
}

/* ===== Notices ===== */
.rtf-notice {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 0 16px 0;
}

.rtf-notice.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.rtf-notice.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.rtf-notice.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ===== Pagination ===== */
.rtf-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 14px 0 0 0;
    padding: 12px 0 0 0;
    border-top: 1px solid #e5e7eb;
}

.rtf-pagination .page-numbers {
    display: inline-block;
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 5px 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.rtf-pagination .page-numbers:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.rtf-pagination .page-numbers.current {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

/* ===== Assist Banner ===== */
.rtf-assist-global-banner {
    position: sticky;
    top: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 18px;
    background: #111827;
    color: #fff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    flex-wrap: wrap;
}

.rtf-assist-global-banner strong {
    color: #fff;
}

.rtf-assist-global-banner span {
    color: #f3f4f6;
}

.rtf-assist-global-banner .rtf-btn {
    background: #fff !important;
    color: #111827 !important;
    border-color: #fff !important;
}

.rtf-assist-global-banner .rtf-btn:hover {
    background: #f3f4f6 !important;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .rtf-grid-two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rtf-wrap,
    .rtf-admin .rtf-panel {
        padding: 16px;
    }
    
    .rtf-tabs {
        gap: 4px;
    }
    
    .rtf-tabs a {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .rtf-filterbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .rtf-filterbar input[type="search"],
    .rtf-filterbar select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    
    .rtf-bulkbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .rtf-bulkbar select,
    .rtf-bulkbar input[type="text"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rtf-btn,
    .rtf-filterbar .rtf-btn,
    .rtf-bulkbar .rtf-btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .rtf-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .rtf-assist-global-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #dashboard {
        flex-direction: column !important;
    }
    
    .dashboard-nav {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
    
    .dashboard-content {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 520px) {
    .rtf-wrap {
        padding: 14px;
    }
    
    .rtf-box {
        padding: 14px;
    }
    
    .rtf-tabs a {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .rtf-card strong {
        font-size: 18px;
    }
    
    .rtf-cards {
        grid-template-columns: 1fr;
    }
}