/* --- RESET & VARIABLES --- */
:root {
    --mod-primary: #6366f1; /* Indigo 500 */
    --mod-primary-hover: #4f46e5;
    --mod-bg: #f9fafb; /* Slate 50 */
    --mod-card-bg: #ffffff;
    --mod-text-main: #111827; /* Gray 900 */
    --mod-text-muted: #6b7280; /* Gray 500 */
    --mod-border: #e5e7eb;
    --mod-success: #10b981;
    --mod-warning: #f59e0b;
    --mod-danger: #ef4444;
    --mod-radius: 16px;
    --mod-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --mod-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.mod-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--mod-bg);
    padding: 40px;
    border-radius: var(--mod-radius);
    max-width: 1200px;
    margin: 30px auto;
    color: var(--mod-text-main);
}

/* --- NAVIGATION PILLS --- */
.mod-navigation {
    background: var(--mod-card-bg);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: var(--mod-shadow);
    margin: 0 auto 30px auto;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--mod-border);
}

.mod-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.mod-navigation a {
    text-decoration: none;
    color: var(--mod-text-muted);
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mod-navigation a:hover {
    background: #f3f4f6;
    color: var(--mod-text-main);
}

.mod-navigation a.active {
    background: var(--mod-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* --- BADGES & BUTTONS (General) --- */
.btn-primary {
    background: var(--mod-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover { background: var(--mod-primary-hover); }

/* --- FORMS --- */
.mod-form input, .mod-form select, .mod-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--mod-border);
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.mod-form input:focus {
    outline: none;
    border-color: var(--mod-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =========================================
   PRO DASHBOARD STYLES (Dashboard Page)
   ========================================= */

/* Wrapper */
.mod-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Hero Section */
.mod-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}
.mod-date-pill {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}
.mod-hero h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}
.mod-hero p {
    color: #64748b;
    margin: 5px 0 0 0;
}
.mod-btn-outline {
    text-decoration: none;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.mod-btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* KPI Grid */
.mod-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

/* Stat Cards */
.mod-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px; /* Uniform height */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.mod-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

/* Primary Earnings Card (Special) */
.mod-stat-card.primary-card {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
}
.mod-stat-card.primary-card .stat-label { color: rgba(255,255,255,0.8); }
.mod-stat-card.primary-card .stat-value { color: #ffffff; }
.mod-stat-card.primary-card .stat-icon-bg {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.2;
    color: white;
}

/* Regular Cards */
.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-wrap.orange { background: #fff7ed; color: #ea580c; }
.icon-wrap.blue { background: #eff6ff; color: #3b82f6; }
.icon-wrap.green { background: #f0fdf4; color: #16a34a; }

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}
.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    display: block;
    margin-top: 10px;
}
.stat-desc {
    font-size: 12px;
    color: #94a3b8;
}

/* Alert State for Pending */
.mod-stat-card.alert-state {
    border-color: #fdba74;
    background: #fffaf5;
}

/* Activity Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.view-all-link {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #6366f1;
}

/* Clean Table */
.mod-clean-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.mod-clean-table th {
    text-align: left;
    padding: 12px 10px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}
.mod-clean-table td {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
}
.mod-clean-table td.td-amount {
    font-weight: 700;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
}
.empty-state {
    text-align: center;
    padding: 40px !important;
}
.empty-content p {
    color: #94a3b8;
    margin: 10px 0 0 0;
}

/* =========================================
   VENDORS CRM STYLES (Vendors Page)
   ========================================= */

/* Search Box (Decorative) */
.mod-search-wrapper {
    margin-bottom: 20px;
}
.mod-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 10px;
    color: #94a3b8;
    width: 250px;
    transition: all 0.2s;
}
.mod-search-box:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* Table Card Wrapper */
.mod-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden; /* For rounded corners on table */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

/* CRM Table Layout */
.mod-crm-table {
    width: 100%;
    border-collapse: collapse;
}
.mod-crm-table th {
    background: #f8fafc;
    padding: 16px 24px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.mod-crm-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.mod-crm-table tr:last-child td {
    border-bottom: none;
}
.mod-crm-table tr:hover td {
    background: #fcfcfc;
}

/* Profile Flex (Avatar + Text) */
.mod-profile-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mod-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.mod-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mod-profile-info {
    display: flex;
    flex-direction: column;
}
.mod-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}
.mod-email {
    font-size: 12px;
    color: #64748b;
}

/* Meta Data */
.td-meta {
    color: #64748b;
    font-size: 13px;
}

/* Status Badges with Dots */
.mod-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}
.mod-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
/* Pending */
.mod-badge.pending { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.mod-badge.pending .dot { background: #ea580c; }
/* Approved */
.mod-badge.approved { background: #f0fdf4; color: #15803d; border: 1px solid #dcfce7; }
.mod-badge.approved .dot { background: #16a34a; }
/* Rejected */
.mod-badge.rejected { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }
.mod-badge.rejected .dot { background: #dc2626; }

/* Action Buttons */
.mod-action-flex {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.mod-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-approve {
    background: #22c55e;
    color: white;
    box-shadow: 0 2px 5px rgba(34, 197, 94, 0.3);
}
.btn-approve:hover {
    background: #16a34a;
    transform: translateY(-1px);
}
.btn-reject {
    background: white;
    border-color: #e2e8f0;
    color: #ef4444;
}
.btn-reject:hover {
    background: #fef2f2;
    border-color: #fee2e2;
}
.mod-text-muted {
    font-size: 12px;
    color: #cbd5e1;
    font-style: italic;
}
/* =========================================
   EARNINGS PAGE STYLES
   ========================================= */

.mod-finance-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr; /* Wallet is wider */
    gap: 24px;
    margin-bottom: 40px;
}
@media (max-width: 900px) {
    .mod-finance-grid { grid-template-columns: 1fr; }
}

/* Wallet Card (The Main Highlight) */
.mod-wallet-card {
    background: linear-gradient(120deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
}

/* Abstract Background Pattern */
.wallet-pattern {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

.wallet-content {
    position: relative;
    z-index: 2;
}

.wallet-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
    display: block;
    margin-bottom: 10px;
}

.wallet-amount {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
    color: #ffffff;
}

.wallet-status {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* Withdrawal Button */
.mod-btn-withdraw {
    background: #ffffff;
    color: #0f172a;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mod-btn-withdraw:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

/* =========================================
   SETTINGS PAGE STYLES
   ========================================= */

.mod-settings-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-top: 20px;
}
@media (max-width: 800px) {
    .mod-settings-grid { grid-template-columns: 1fr; }
}

/* Left: Profile Card */
.mod-profile-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.profile-header-bg {
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

.profile-content {
    padding: 0 20px 30px;
    position: relative;
    top: -40px; /* Pull avatar up */
}

.profile-avatar-xl {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #fff;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.profile-avatar-xl img {
    width: 100%;
    height: auto;
}

.mod-profile-card h3 {
    margin: 0 0 5px;
    font-size: 18px;
    color: #1e293b;
}

.mod-role-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.profile-meta {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    text-align: left;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
}
.meta-row .label { color: #94a3b8; }
.meta-row .value { color: #334155; font-weight: 500; }

/* Right: Form Card */
.mod-form-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 30px;
}

.mod-form-card .card-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}
.mod-form-card h3 { margin: 0; font-size: 18px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.help-text {
    font-size: 12px;
    color: #94a3b8;
    margin-top: -15px; /* Pull closer to input */
    margin-bottom: 20px;
}

.form-actions {
    margin-top: 30px;
    text-align: right;
}
/* =========================================
   SUPPORT PAGE STYLES
   ========================================= */

.mod-support-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .mod-support-grid { grid-template-columns: 1fr; }
}

/* Radio Group (Priority) */
.mod-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.radio-label {
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Info Panel Styling */
.mod-info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Guidelines Card */
.mod-guidelines-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
}
.mod-guidelines-card h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
}
.mod-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mod-check-list li {
    font-size: 13px;
    color: #334155;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
}
.mod-check-list li::before {
    content: '•';
    color: #6366f1;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 18px;
    line-height: 14px;
}

/* --- PREMIUM FILTER DROPDOWN --- */

.mod-filter-form {
    display: flex;
    align-items: center;
}

.mod-select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 200px;
}

/* Hide Default Browser Arrow */
.mod-premium-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 40px 10px 38px; /* Left padding for icon, Right for arrow */
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    outline: none;
    line-height: 1.5;
}

/* Hover State */
.mod-premium-select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    background-color: #f8fafc;
}

/* Focus State */
.mod-premium-select:focus {
    border-color: #6366f1; /* Primary Color */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Left Icon Styling */
.mod-select-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.mod-select-icon svg {
    width: 16px;
    height: 16px;
}

/* Right Custom Arrow Styling */
.mod-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

/* Rotate arrow when active (Optional, works with JS usually but purely CSS visuals here) */
.mod-premium-select:active + .mod-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}