/*
 * OWL Capture Pages — v1.0.9
 * All capture/bridge page styles are now inline per-template.
 * This file handles only the Affiliate Center (member dashboard).
 */

/* ============================================================
   MY AFFILIATE CENTER
   ============================================================ */

.owl-ac-wrap { max-width:900px; margin:0 auto; }

.owl-ac-tabs {
    display:flex; gap:4px;
    border-bottom:2px solid #222; margin-bottom:28px; flex-wrap:wrap;
}
.owl-ac-tab {
    display:inline-flex; align-items:center; gap:6px;
    padding:10px 20px; color:#888 !important;
    text-decoration:none !important; font-size:0.9rem; font-weight:600;
    border-bottom:2px solid transparent; margin-bottom:-2px;
    transition:color 0.2s, border-color 0.2s;
}
.owl-ac-tab:hover { color:#fff !important; }
.owl-ac-tab-active { color:#00AA44 !important; border-bottom-color:#00AA44; }

.owl-ac-badge {
    background:#00AA44; color:#000; font-size:0.7rem; font-weight:800;
    padding:2px 7px; border-radius:10px; min-width:18px; text-align:center;
}

.owl-ac-panel { animation:owl-ac-fadein 0.2s ease; }
@keyframes owl-ac-fadein { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

.owl-ac-section {
    background:#1a1a1a; border:1px solid #2a2a2a;
    border-radius:8px; padding:24px 28px; margin-bottom:20px;
}
.owl-ac-section-title {
    color:#00AA44 !important; font-size:1rem !important; font-weight:700 !important;
    text-transform:uppercase; letter-spacing:0.06em;
    margin:0 0 6px 0 !important; display:flex; align-items:center; gap:10px;
}
.owl-ac-leads-count { font-size:0.8rem; color:#666; font-weight:400; text-transform:none; letter-spacing:0; }
.owl-ac-section-desc { color:#777; font-size:0.88rem; margin-bottom:18px; line-height:1.5; }

.owl-ac-link-row { display:flex; gap:8px; align-items:center; }
.owl-ac-link-input {
    flex:1; padding:10px 12px; background:#0d0d0d;
    border:1px solid #333; border-radius:4px; color:#00AA44;
    font-size:0.85rem; cursor:pointer; min-width:0;
}
.owl-ac-copy-btn {
    padding:10px 18px; background:#00AA44; color:#000;
    font-weight:700; font-size:0.85rem; border:none;
    border-radius:4px; cursor:pointer; white-space:nowrap;
    transition:background 0.2s; flex-shrink:0;
}
.owl-ac-copy-btn:hover { background:#007733; color:#fff; }
.owl-ac-copy-btn.copied { background:#0d2d1a; color:#00AA44; border:1px solid #00AA44; }

.owl-ac-pages-grid {
    display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:16px; margin-top:16px;
}
.owl-ac-page-card { background:#111; border:1px solid #2a2a2a; border-radius:8px; padding:18px 20px; }
.owl-ac-page-card.owl-ac-page-locked { opacity:0.6; }
.owl-ac-page-card-header { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.owl-ac-page-type-badge {
    font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
    background:#0d2d1a; color:#00AA44; padding:3px 8px; border-radius:3px;
}
.owl-ac-badge-bridge { background:#1a1a2e; color:#7c83ff; }
.owl-ac-badge-ebook  { background:#0d1a0d; color:#88dd44; border-color:#88dd44; }
.owl-ac-lead-count   { font-size:11px; background:#1a2d1a; color:#88dd44; border:1px solid #88dd44; border-radius:10px; padding:2px 8px; margin-left:auto; font-weight:600; }
.owl-ac-ebook-name   { font-size:12px; color:#888; margin:4px 0 10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.owl-ac-section-tip  { background:#0d1a0d; border-left:3px solid var(--owl-green,#00AA44); padding:10px 14px; border-radius:0 6px 6px 0; font-size:13px; color:#aaa; line-height:1.6; margin-bottom:16px; }
.owl-ac-locked-badge { font-size:0.7rem; color:#ffa000; background:#2a1a00; padding:3px 8px; border-radius:3px; }
.owl-ac-page-name { color:#fff; font-weight:700; font-size:0.95rem; margin-bottom:12px; }
.owl-ac-page-actions { margin-top:8px; }
.owl-ac-preview-link { color:#00AA44; font-size:0.8rem; text-decoration:none; }
.owl-ac-preview-link:hover { color:#00cc55; }
.owl-ac-preview-link:visited { color:#00AA44; }
.owl-ac-upgrade-note { color:#ffa000; font-size:0.82rem; margin:8px 0 0; }

.owl-ac-leads-header {
    display:flex; align-items:center; justify-content:space-between;
    gap:12px; flex-wrap:wrap; margin-bottom:16px;
}
.owl-ac-csv-btn {
    padding:8px 18px; background:transparent; border:1px solid #00AA44;
    color:#00AA44; font-size:0.85rem; font-weight:700;
    border-radius:4px; cursor:pointer; transition:all 0.2s;
}
.owl-ac-csv-btn:hover { background:#00AA44; color:#000; }

.owl-ac-table-wrap { overflow-x:auto; }
.owl-ac-table { width:100%; border-collapse:collapse; font-size:0.88rem; }
.owl-ac-table th {
    color:#888; font-size:0.75rem; text-transform:uppercase; letter-spacing:0.06em;
    padding:10px 12px; border-bottom:1px solid #2a2a2a; text-align:left;
}
.owl-ac-table td { padding:11px 12px; border-bottom:1px solid #1a1a1a; color:#ccc; }
.owl-ac-table tr:last-child td { border-bottom:none; }
.owl-ac-table tr:hover td { background:rgba(255,255,255,0.02); }
.owl-ac-table-note { color:#555; font-size:0.8rem; margin-top:12px; text-align:center; }
.owl-ac-empty { text-align:center; padding:40px 20px; color:#555; font-size:0.9rem; }

.owl-ac-photo-preview { margin-bottom:20px; }
.owl-ac-photo-thumb {
    width:90px; height:90px; border-radius:50%;
    border:2px solid #00AA44; object-fit:cover; display:block; margin-bottom:8px;
}
.owl-ac-photo-note { color:#888; font-size:0.85rem; }
.owl-ac-photo-form .owl-ac-field-row { margin-bottom:14px; }
.owl-ac-photo-form label { display:block; color:#aaa; font-size:0.85rem; margin-bottom:6px; }
.owl-ac-photo-form input[type="url"] {
    width:100%; max-width:480px; padding:10px 12px;
    background:#0d0d0d; border:1px solid #333; border-radius:4px;
    color:#fff; font-size:0.9rem; box-sizing:border-box;
}
.owl-ac-photo-form small { display:block; color:#555; font-size:0.8rem; margin-top:5px; }

.owl-success {
    background:#0d2d1a; border:1px solid #00AA44; color:#00AA44;
    padding:12px 15px; border-radius:4px; margin-bottom:20px; font-size:14px;
}
.owl-btn { display:inline-block; padding:13px 28px; border-radius:5px; font-size:16px; font-weight:700; cursor:pointer; border:none; transition:all 0.2s; text-decoration:none; }
.owl-btn-primary { background:#00AA44; color:#fff; width:100%; text-align:center; }
.owl-btn-primary:hover { background:#007733; }

@media(max-width:600px) {
    .owl-ac-tabs { gap:0; }
    .owl-ac-tab { padding:8px 12px; font-size:0.82rem; }
    .owl-ac-section { padding:18px 16px; }
    .owl-ac-pages-grid { grid-template-columns:1fr; }
    .owl-ac-link-row { flex-direction:column; }
    .owl-ac-copy-btn { width:100%; }
}

/* ============================================================
   EARNINGS TAB
   ============================================================ */

.owl-ac-earnings-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:20px;
}

.owl-ac-earnings-box {
    background:#1a1a1a;
    border:1px solid #2a2a2a;
    border-radius:8px;
    padding:20px 18px;
    text-align:center;
}

.owl-ac-earnings-label {
    color:#888;
    font-size:0.72rem;
    text-transform:uppercase;
    letter-spacing:0.08em;
    margin-bottom:10px;
}

.owl-ac-earnings-value {
    font-size:1.6rem;
    font-weight:800;
    margin-bottom:5px;
    line-height:1;
}

.owl-ac-earnings-value.available  { color:#00AA44; }
.owl-ac-earnings-value.pending    { color:#ffa000; }
.owl-ac-earnings-value.lifetime   { color:#7c83ff; }
.owl-ac-earnings-value.withdrawn  { color:#888; }

.owl-ac-earnings-sub {
    color:#555;
    font-size:0.75rem;
}

.owl-error {
    background:#3d1111;
    border:1px solid #aa0000;
    color:#ff6666;
    padding:12px 15px;
    border-radius:4px;
    font-size:14px;
}

@media(max-width:700px) {
    .owl-ac-earnings-grid { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:400px) {
    .owl-ac-earnings-grid { grid-template-columns:1fr; }
}

/* ============================================================
   MY REFERRALS TAB
   ============================================================ */

/* Summary bar */
.owl-ac-ref-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
}
.owl-ac-ref-summary-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}
.owl-ac-ref-summary-counts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.owl-ac-ref-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid;
}
.owl-ac-ref-pill strong { font-weight: 800; }
.owl-ac-ref-pill-all      { background: #1a1a1a; border-color: #444; color: #ccc; }
.owl-ac-ref-pill-free     { background: #1a1a1a; border-color: #555; color: #aaa; }
.owl-ac-ref-pill-pro      { background: #0d2d1a; border-color: #00AA44; color: #00AA44; }
.owl-ac-ref-pill-director { background: #1a2a00; border-color: #88cc00; color: #88cc00; }

/* Filter buttons */
.owl-ac-ref-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.owl-ac-ref-filter-btn {
    padding: 7px 16px;
    border-radius: 5px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #888;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.owl-ac-ref-filter-btn:hover {
    border-color: #00AA44;
    color: #fff;
    background: #1a1a1a;
}
.owl-ac-ref-filter-btn.active {
    background: #00AA44;
    border-color: #00AA44;
    color: #000;
}

/* Tier badges */
.owl-ref-tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.owl-ref-badge-free     { background: #2a2a2a; color: #aaa; }
.owl-ref-badge-pro      { background: #0d2d1a; color: #00AA44; }
.owl-ref-badge-director { background: #1a2a00; color: #88cc00; }

/* Status indicators */
.owl-ref-status {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.owl-ref-status-active   { color: #00AA44; }
.owl-ref-status-inactive { color: #cc4400; }

/* Name link */
.owl-ref-name-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.owl-ref-name-link:hover { color: #00AA44; }

/* Email link */
.owl-ref-email-link {
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}
.owl-ref-email-link:hover { color: #00AA44; }

@media (max-width: 700px) {
    .owl-ac-ref-summary { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.owl-ac-leads-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.owl-ac-delete-btn { background:transparent; border:1px solid #c0392b; color:#e74c3c; padding:6px 14px; border-radius:5px; font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; }
.owl-ac-delete-btn:hover { background:#c0392b; color:#fff; }
.owl-ac-delete-all-btn { background:transparent; border:1px solid #555; color:#888; padding:6px 14px; border-radius:5px; font-size:13px; cursor:pointer; transition:all .2s; }
.owl-ac-delete-all-btn:hover { border-color:#c0392b; color:#e74c3c; }
.owl-lead-cb { cursor:pointer; accent-color:var(--owl-green,#00AA44); width:16px; height:16px; }
#owl-select-all { cursor:pointer; accent-color:var(--owl-green,#00AA44); width:16px; height:16px; }
/* ============================================================
   SOURCE TRACKING TAB
   ============================================================ */
.owl-source-empty {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

.owl-source-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.owl-source-empty p {
    color: #666;
    font-size: 0.95rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

.owl-source-empty code,
.owl-ac-section-desc code {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 0.85em;
    color: #00AA44;
    font-family: monospace;
}

.owl-source-table-wrap {
    overflow-x: auto;
}

.owl-source-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

/* Column widths */
.owl-source-table colgroup col:nth-child(1) { width: 28%; }
.owl-source-table colgroup col:nth-child(2) { width: 28%; }
.owl-source-table colgroup col:nth-child(3) { width: 14%; }
.owl-source-table colgroup col:nth-child(4) { width: 14%; }
.owl-source-table colgroup col:nth-child(5) { width: 16%; }

.owl-source-table thead tr {
    background: #111;
    border-bottom: 2px solid #333;
}

.owl-source-table thead th {
    padding: 12px 16px;
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    white-space: nowrap;
    text-align: left;
}

/* Center numeric headers */
.owl-source-table thead th:nth-child(3),
.owl-source-table thead th:nth-child(4),
.owl-source-table thead th:nth-child(5) {
    text-align: center;
}

.owl-source-table tbody tr {
    border-bottom: 1px solid #222;
    transition: background 0.15s;
}

.owl-source-table tbody tr:hover {
    background: #1a1a1a;
}

.owl-source-table td {
    padding: 12px 16px;
    vertical-align: middle;
    text-align: left;
}

/* Numeric columns — center headers and data cells */
.owl-source-table th:nth-child(3),
.owl-source-table th:nth-child(4),
.owl-source-table th:nth-child(5),
.owl-source-table td:nth-child(3),
.owl-source-table td:nth-child(4),
.owl-source-table td:nth-child(5) {
    text-align: center !important;
}

.owl-source-tag {
    min-width: 120px;
}

.owl-source-label {
    display: inline-block;
    background: #0d2d1a;
    border: 1px solid #00AA44;
    color: #00AA44;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.owl-source-unknown {
    display: inline-block;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #666;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-style: italic;
}

.owl-source-entry {
    color: #aaa;
    white-space: nowrap;
}

.owl-source-num {
    text-align: center;
    color: #ccc;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.owl-source-signups {
    color: #00AA44;
    font-weight: 600;
}

.owl-source-conv {
    display: inline-block;
    background: #0d2d1a;
    color: #00AA44;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
}

.owl-source-conv-zero {
    color: #444;
}

.owl-source-totals {
    background: #111;
    border-top: 2px solid #333;
}

.owl-source-totals td {
    padding: 12px 16px;
    color: #ccc;
}

.owl-source-totals td:nth-child(3),
.owl-source-totals td:nth-child(4),
.owl-source-totals td:nth-child(5) {
    text-align: center;
}
