/* Main Styles */
/* “Blast” away any theme margin/padding and force full-bleed width */

.pdf-csv-export-button-front-end {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.export-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    text-transform: uppercase;
}

.csv-btn {
    background: #0073e6; /* Blue for CSV */
}

.pdf-btn {
    background: #e63946; /* Red for PDF */
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.export-btn:active {
    transform: scale(0.98);
}


button#apply-commissions-filters, button#apply-referral-filters, button#apply-analytics-filters {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    height: 40px;
    align-self: flex-end;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

input.cam-stripe-account-id {
    overflow-clip-margin: 0px !important;
    overflow: clip !important;
    padding-block: 1px;
    padding-inline: 2px;
}

button.secondary.cam-connect-existing {
    margin-top: 10px;
}

body .cam-dashboard {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box; /* so padding on children won’t overflow */
}


.cam-dashboard {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

.cam-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cam-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Sidebar Styles */
.cam-sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    padding: 25px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.cam-brand {
    font-size: 1.4rem;
    font-weight: 700;
    padding: 0 25px 25px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 25px;
    line-height: 1.3;
}

.cam-menu-group, .cam-dash-group {
    padding: 0 15px;
}

.cam-menu-item, .cam-dash-item {
    padding: 12px 20px;
    margin: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.cam-menu-item {
    color: #bdc3c7;
}

.cam-dash-item {
    font-weight: 600;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
}

.cam-dash-item.active {
    background: #3498db;
}

.cam-dash-item:hover, .cam-menu-item:hover {
    background: #34495e;
}

/* Main Content Styles */
.cam-main-content {
    flex: 1;
    padding: 30px;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.cam-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
    gap: 1px;
}

.cam-tab {
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 600;
    color: #7f8c8d;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-bottom: none;
    position: relative;
    top: 1px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cam-tab.active {
    color: #3498db;
    background: #fff;
    border-top: 2px solid #3498db;
}

.cam-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    font-weight: 700;
}

.cam-amount {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Filter Styles */
.cam-filters {
    display: flex;
    gap: 15px;
    margin: 0 0 25px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cam-filter-group {
    display: flex;
    flex-direction: column;
}

.cam-filter-group label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 600;
}

.cam-filter-group select, 
.cam-filter-group input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 180px;
    font-size: 0.95rem;
}

.cam-payout-group {
    display: flex;
    flex-direction: column;
}

.cam-payout-group label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 600;
}

.cam-payout-group select, 
.cam-payout-group input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    /*min-width: 180px;*/
    font-size: 0.95rem;
}

.cam-apply-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    height: 40px;
    align-self: flex-end;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.cam-payout-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    height: 35px;
    align-self: flex-end;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* Table Styles */
.cam-table {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 20px;
}

.cam-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cam-table-row.header {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
}

.cam-table-row > div {
    padding: 5px 0;
    font-size: 0.95rem;
}

.status-approved { color: #27ae60; font-weight: 600; }
.status-requested, .status-request { color: #f39c12; font-weight: 600; }
.status-not-eligible { color: #e74c3c; font-weight: 600; }

/* Referrals Table Columns */
.col-link { grid-column: 1; }
.col-origin { grid-column: 2; }
.col-date { grid-column: 3; }
.col-status { grid-column: 4; }
.col-commission { grid-column: 5; }
.col-payout { grid-column: 6; }

/* Leaderboard Styles */
.cam-leaderboard .cam-section {
    background: #f8f9fa;
}

.cam-legend {
    display: flex;
    gap: 20px;
    margin: 15px 0 20px;
}

.formed, .pending {
    width: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px;
    font-size: 17px;
    font-weight: 600;
}

.formed:before, .pending:before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.formed:before { background: #181C2D; }
.pending:before { background: #949AB6; }

.cam-bar-item {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.cam-name {
    width: 150px;
    font-weight: 600;
    font-size: 0.95rem;
}

.cam-bar-container {
    flex: 1;
    height: 25px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    margin: 0 15px;
}

.cam-bar {
    height: 100%;
}

.formed { background: #181C2D; }
.pending { background: #949AB6; }

.cam-amount {
    width: 100px;
    text-align: right;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Settings Styles */
.cam-stripe-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #f9fbfd;
}

.cam-stripe-item {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.cam-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cam-stripe-actions {
    display: flex;
    gap: 10px;
}

.cam-stripe-actions button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.cam-stripe-actions button:first-child {
    background: #3498db;
    color: white;
    border: none;
}

.cam-stripe-actions button.secondary {
    background: white;
    border: 1px solid #3498db;
    color: #3498db;
}

.cam-link-generator {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cam-link-preview {
    flex: 1;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cam-link-actions button {
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.cam-link-actions button:first-child {
    background: white;
    border: 1px solid #3498db;
    color: #3498db;
    margin-right: 5px;
}

.cam-link-actions button:last-child {
    background: #3498db;
    color: white;
    border: none;
}

/* Login Styles */
/* ... (previous styles) ... */

/* Updated Login Styles */
.cam-login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 40px;
}

.cam-login-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cam-login-form {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    padding: 40px;
    border: 1px solid #eaeaea;
}

.cam-input-group {
    margin-bottom: 25px;
}

.cam-input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cam-input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.05rem;
    transition: all 0.3s;
    background: #f9fbfd;
}

.cam-input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.cam-login-btn {
    width: 100%;
    padding: 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 15px;
}

.cam-login-btn:hover {
    background: #2980b9;
}

.cam-login-message {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    display: none;
    font-weight: 600;
}

.cam-login-message.error {
    background: #ffebee;
    color: #c62828;
    display: block;
}

.cam-login-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    display: block;
}

/* Responsive adjustments for login */
@media (max-width: 768px) {
    .cam-container {
        flex-direction: column;
    }
    
    .cam-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .cam-login-container {
        padding: 20px;
    }
    
    .cam-login-form {
        padding: 30px;
    }
    
    .cam-login-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
}

/* Referrals Table Styles */
/* Referrals Table Styles */
.cam-referrals .cam-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cam-referrals .cam-table-row.header {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
}

.col-link { grid-column: 1; }
.col-origin { grid-column: 2; }
.col-date { grid-column: 3; }
.col-status { grid-column: 4; }
.col-commission { grid-column: 5; }
.col-payout { grid-column: 6; }

/* Status Indicators */
.status-converted { color: #27ae60; font-weight: 600; }
.status-pending { color: #f39c12; font-weight: 600; }
.status-approved { color: #27ae60; font-weight: 600; }
.status-requested { color: #f39c12; font-weight: 600; }
.status-paid { color: #27ae60; font-weight: 600; }
.status-not-eligible { color: #e74c3c; font-weight: 600; }

/* URL Trimming */
.col-link a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #3498db;
    text-decoration: none;
}

.col-link a:hover {
    text-decoration: underline;
}

/* Empty State */
.col-empty {
    grid-column: 1 / span 6;
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* Level Banner */
.cam-level-banner {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.cam-level-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

.cam-level-badge {
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cam-level-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.cam-level-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 1rem;
}

.cam-level-info strong {
    color: #27ae60;
    font-size: 1.2rem;
}


.cam-link-generator {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cam-input-row {
  display: flex;
  gap: 8px;
}

.cam-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccd0d4;
  border-radius: 3px;
  font-size: 14px;
}

#cam-generate-affiliate {
  min-width: 100px;
}

.cam-generated-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.cam-platform-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cam-link-preview {
  flex: 1;
  background: #f7f7f7;
  padding: 6px 8px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 13px;
}



.cam-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
}

.cam-link-actions {
    margin-top: 8px;
}

.cam-generated-links {
    margin-top: 12px;
}

.cam-platform-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.cam-link-preview {
    flex: 1;
    background: #f7f7f7;
    padding: 6px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
}

/* Minimal styling hooks – reuse your dashboard styles where possible */
.cam-summary-cards {
    display:flex; gap:20px; flex-wrap:wrap;
}
.cam-card {
    background:#fff; border:1px solid #e5e5e5; border-radius:8px; padding:15px 20px; flex:1; min-width:220px;
}
.cam-card h4 { margin:0 0 8px; font-size:14px; color:#666; }
.cam-card .cam-amount { font-size:20px; font-weight:600; }

.cam-radio-group label { margin-right:15px; font-weight:normal; }

.cam-alert { padding:12px 15px; border-radius:6px; margin-bottom:15px; }
.cam-alert-error { background:#ffe9e9; color:#a40000; }
.cam-alert-success { background:#e7ffe9; color:#0b6b2e; }

.status-requested, .status-processing { color:#b26a00; }
.status-approved, .status-paid { color:#0b6b2e; }
.status-rejected { color:#a40000; }
