/* ═══════════════════════════════════════
   ADNetwork Frontend Styles
   ═══════════════════════════════════════ */

:root {
    --wf-primary: #2563eb;
    --wf-primary-hover: #1d4ed8;
    --wf-success: #16a34a;
    --wf-warning: #d97706;
    --wf-danger: #dc2626;
    --wf-text: #1f2937;
    --wf-text-muted: #6b7280;
    --wf-bg: #f9fafb;
    --wf-card-bg: #ffffff;
    --wf-border: #e5e7eb;
    --wf-radius: 8px;
    --wf-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

/* ─── Layout ─── */

.wf-dashboard,
.wf-payout,
.wf-gsc,
.wf-surfbar,
.wf-paidmail-inbox,
.wf-rallys,
.wf-stats-public {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--wf-text);
    line-height: 1.5;
}

/* ─── Grid ─── */

.wf-grid { display: grid; gap: 16px; margin: 16px 0; }
.wf-grid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.wf-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.wf-grid-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ─── Widgets (balance cards) ─── */

.wf-widget {
    background: var(--wf-card-bg);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--wf-shadow);
    transition: transform 0.15s ease;
}
.wf-widget:hover { transform: translateY(-2px); }
.wf-widget-icon { font-size: 28px; margin-bottom: 4px; }
.wf-widget-value { font-size: 24px; font-weight: 700; color: var(--wf-primary); }
.wf-widget-label { font-size: 13px; color: var(--wf-text-muted); margin-top: 4px; }

/* ─── Quick Links ─── */

.wf-quick-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--wf-card-bg);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    text-decoration: none;
    color: var(--wf-text);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
    box-shadow: var(--wf-shadow);
}
.wf-quick-link:hover {
    border-color: var(--wf-primary);
    color: var(--wf-primary);
    transform: translateY(-1px);
}
.wf-has-badge { position: relative; }
.wf-has-badge .wf-badge {
    background: var(--wf-danger);
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    margin-left: 4px;
}

/* ─── Sections ─── */

.wf-section { margin: 24px 0; }
.wf-section h3, .wf-section h4 {
    font-size: 16px; font-weight: 600; margin: 0 0 12px;
    color: var(--wf-text);
}

.wf-welcome h2 {
    font-size: 22px; font-weight: 600; margin: 0 0 16px;
}

/* ─── Tables ─── */

.wf-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--wf-card-bg);
    border-radius: var(--wf-radius);
    overflow: hidden;
    box-shadow: var(--wf-shadow);
    font-size: 14px;
}
.wf-table thead th {
    background: var(--wf-bg);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--wf-text-muted);
    border-bottom: 2px solid var(--wf-border);
}
.wf-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--wf-border);
}
.wf-table tbody tr:last-child td { border-bottom: none; }
.wf-table tbody tr:hover { background: #f3f4f6; }
.wf-table-compact { font-size: 13px; }
.wf-table-compact td, .wf-table-compact th { padding: 6px 10px; }

.wf-number { text-align: right; font-variant-numeric: tabular-nums; }
.wf-positive { color: var(--wf-success); font-weight: 600; }
.wf-negative { color: var(--wf-danger); font-weight: 600; }
.wf-read { opacity: 0.6; }
.wf-unread { font-weight: 500; }

/* ─── Badges ─── */

.wf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.wf-badge-green { background: #dcfce7; color: #166534; }
.wf-badge-orange { background: #fef3c7; color: #92400e; }
.wf-badge-red { background: #fef2f2; color: #991b1b; }

/* ─── Referral Box ─── */

.wf-ref-box {
    display: flex;
    gap: 8px;
    align-items: center;
}
.wf-input-copy {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    font-size: 14px;
    background: var(--wf-bg);
    cursor: pointer;
}
.wf-ref-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--wf-text-muted);
}

/* ─── Forms ─── */

.wf-form { max-width: 480px; }
.wf-form-inline {
    max-width: 100%;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.wf-field {
    margin-bottom: 16px;
}
.wf-field label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--wf-text);
}
.wf-field label input[type="checkbox"] {
    margin-right: 6px;
}

.wf-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    font-size: 14px;
    color: var(--wf-text);
    background: #fff;
    transition: border-color 0.15s;
}
.wf-input:focus {
    outline: none;
    border-color: var(--wf-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.wf-input-small { width: 120px; }

/* ─── Buttons ─── */

.wf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--wf-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.wf-btn-primary {
    background: var(--wf-primary);
    color: #fff;
}
.wf-btn-primary:hover {
    background: var(--wf-primary-hover);
}
.wf-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ─── Notices ─── */

.wf-notice {
    padding: 12px 16px;
    border-radius: var(--wf-radius);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 14px;
    margin: 16px 0;
}
.wf-notice-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.wf-error {
    padding: 12px 16px;
    border-radius: var(--wf-radius);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    margin: 16px 0;
}
.wf-info {
    font-size: 13px;
    color: var(--wf-text-muted);
}
.wf-empty {
    text-align: center;
    color: var(--wf-text-muted);
    padding: 24px;
    font-style: italic;
}
.wf-done { color: var(--wf-success); }
.wf-info-bar {
    padding: 12px 16px;
    background: var(--wf-bg);
    border-radius: var(--wf-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

/* ─── Auth Forms ─── */

.wf-auth-form {
    max-width: 420px;
    margin: 40px auto;
    background: var(--wf-card-bg);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 32px;
    box-shadow: var(--wf-shadow);
}
.wf-auth-form h2 {
    text-align: center;
    margin: 0 0 24px;
    font-size: 22px;
}
.wf-auth-links {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}
.wf-auth-links a { color: var(--wf-primary); }

/* ─── Surfbar ─── */

.wf-surfbar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--wf-card-bg);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius) var(--wf-radius) 0 0;
}
.wf-surfbar-timer {
    font-size: 24px;
    font-weight: 700;
    color: var(--wf-primary);
    min-width: 60px;
}
.wf-surfbar-info {
    flex: 1;
    font-size: 14px;
    color: var(--wf-text-muted);
}
.wf-surfbar-frame {
    width: 100%;
    height: 500px;
    border: 1px solid var(--wf-border);
    border-top: none;
    border-radius: 0 0 var(--wf-radius) var(--wf-radius);
}

/* ─── Banner ─── */

.wf-banner { text-align: center; margin: 8px 0; }
.wf-banner-img { max-width: 100%; height: auto; border-radius: 4px; }
.wf-textlink {
    display: inline-block;
    padding: 8px 16px;
    background: var(--wf-bg);
    border: 1px solid var(--wf-border);
    border-radius: 4px;
    color: var(--wf-primary);
    text-decoration: none;
    font-size: 14px;
}
.wf-textlink:hover { border-color: var(--wf-primary); }

/* ─── Rally Cards ─── */

.wf-rally-card {
    background: var(--wf-card-bg);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--wf-shadow);
}
.wf-rally-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.wf-rally-header h4 { margin: 0; font-size: 16px; }
.wf-rally-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--wf-text-muted);
    margin-bottom: 12px;
}
.wf-rally-prizes {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.wf-prize {
    padding: 4px 10px;
    background: #fef3c7;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}
.wf-top-1 td { font-weight: 700; }
.wf-top-2 td { font-weight: 600; }
.wf-top-3 td { font-weight: 500; }

/* ─── Payout Details Toggle ─── */

.wf-payout-details { margin-top: 8px; }

/* ─── Toast Notifications ─── */

.wf-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--wf-radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.wf-toast-show {
    opacity: 1;
    transform: translateY(0);
}
.wf-toast-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.wf-toast-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ─── Button Animations ─── */

.wf-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.wf-btn-pulse {
    animation: wf-pulse 1.5s infinite;
}
@keyframes wf-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* ─── Responsive ─── */

@media (max-width: 640px) {
    .wf-grid-3 { grid-template-columns: 1fr; }
    .wf-grid-4 { grid-template-columns: 1fr 1fr; }
    .wf-surfbar-header { flex-wrap: wrap; }
    .wf-surfbar-frame { height: 350px; }
    .wf-ref-box { flex-direction: column; }
    .wf-form-inline { flex-direction: column; }
    .wf-input-small { width: 100%; }
}

/* Radio Pills */
.wf-radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid var(--wf-border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
}
.wf-radio-pill:has(input:checked) {
    background: var(--wf-primary);
    color: #fff;
    border-color: var(--wf-primary);
}
.wf-radio-pill input { display: none; }

/* ─── Referral Tree ───────────────────────────────────── */
.wf-ref-tree-wrap { max-width: 900px; }

/* Ref Link */
.wf-ref-link-row { display: flex; gap: 8px; align-items: center; }
.wf-ref-link-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    background: var(--wf-bg-alt, #f8f9fa);
    font-family: monospace;
    font-size: 13px;
}

/* Summary Grid */
.wf-ref-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.wf-ref-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px; border-radius: var(--wf-radius);
    background: var(--wf-bg-alt, #f8f9fa);
}
.wf-ref-stat-value { font-size: 22px; font-weight: 700; color: var(--wf-primary); }
.wf-ref-stat-label { font-size: 12px; color: #666; margin-top: 4px; }

/* Level Overview Cards */
.wf-ref-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.wf-ref-level-card {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: var(--wf-bg-alt, #f8f9fa);
    border-radius: var(--wf-radius);
    transition: transform .1s;
}
.wf-ref-level-card:hover { transform: translateY(-1px); }
.wf-ref-level-info {
    display: flex; flex-direction: column; font-size: 12px; line-height: 1.5;
}
.wf-ref-level-count { font-weight: 600; }
.wf-ref-level-rate { color: #666; }
.wf-ref-level-commission { color: var(--wf-primary); font-weight: 500; }

/* Level Badge (shared by overview + tree) */
.wf-ref-level-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px; padding: 0 6px;
    border-radius: 12px; font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}

/* View Toggle */
.wf-ref-view-toggle {
    display: flex; gap: 8px; margin: 12px 0;
}

/* ─── Tree View ─────────────────────────────────────── */
.wf-ref-tree-actions { margin-bottom: 10px; display: flex; gap: 8px; }
.wf-ref-tree, .wf-ref-children {
    list-style: none; margin: 0; padding: 0;
}
.wf-ref-children {
    padding-left: 24px;
    border-left: 2px solid #e0e0e0;
    margin-left: 11px;
}
.wf-ref-node { margin: 2px 0; }
.wf-ref-node-header {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 8px; border-radius: var(--wf-radius);
    transition: background .1s;
}
.wf-ref-node-header:hover { background: var(--wf-bg-alt, #f0f0f0); }

.wf-ref-toggle {
    background: none; border: none; cursor: pointer;
    font-size: 11px; padding: 2px 4px; color: #666;
    transition: transform .2s;
    line-height: 1;
}
.wf-ref-toggle[aria-expanded="true"] { transform: rotate(90deg); }
.wf-ref-leaf { color: #ccc; font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }

.wf-ref-username { font-weight: 500; font-size: 14px; }
.wf-ref-meta {
    display: flex; gap: 12px; margin-left: auto;
    font-size: 12px; color: #888;
}
.wf-ref-date, .wf-ref-commission { white-space: nowrap; }
.wf-ref-commission { font-weight: 500; color: var(--wf-primary); }

.wf-ref-loading {
    display: inline-block; padding: 4px 12px;
    font-size: 12px; color: #999; font-style: italic;
}

/* ─── Table View ────────────────────────────────────── */
.wf-ref-table-filters { margin-bottom: 10px; }
.wf-ref-table-filters select {
    padding: 6px 10px; border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius); font-size: 13px;
}
.wf-ref-table .wf-ref-level-cell {
    white-space: nowrap; font-weight: 600;
}
.wf-ref-table tr[data-level] td:first-child {
    border-left: 4px solid transparent;
}

/* Empty State */
.wf-ref-empty {
    text-align: center; padding: 30px; color: #888; font-style: italic;
}

/* Color Legend */
.wf-ref-legend-items { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-ref-legend-item {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #666;
}
.wf-ref-legend-dot {
    display: inline-block; width: 12px; height: 12px; border-radius: 50%;
}

/* ── Shoutbox ────────────────────────────────────── */
.wf-shoutbox-wrap {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    max-width: 700px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.wf-shoutbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}
.wf-shoutbox-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.wf-shoutbox-online { font-size: 12px; opacity: 0.85; }
.wf-shoutbox-messages {
    height: 320px;
    overflow-y: auto;
    padding: 10px 14px;
    background: #fafbfc;
    scroll-behavior: smooth;
}
.wf-shoutbox-messages::-webkit-scrollbar { width: 6px; }
.wf-shoutbox-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.wf-shoutbox-loading,
.wf-shoutbox-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}
.wf-shoutbox-msg {
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 13px;
    position: relative;
    padding-right: 22px;
}
.wf-sb-time {
    color: #999;
    font-size: 11px;
    margin-right: 4px;
}
.wf-sb-user {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 4px;
}
.wf-sb-user-admin { color: #e74c3c; }
.wf-sb-text { word-break: break-word; }
.wf-shoutbox-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wf-badge-admin { background: #e74c3c; color: #fff; }
.wf-badge-plus { background: #f39c12; color: #fff; }
.wf-sb-delete {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 2px 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.wf-shoutbox-msg:hover .wf-sb-delete { opacity: 1; }
.wf-sb-delete:hover { color: #e74c3c; }

/* Editor */
.wf-shoutbox-editor {
    border-top: 1px solid #eee;
    padding: 8px 12px 10px;
    background: #fff;
}
.wf-shoutbox-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
}
.wf-sb-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.3;
    transition: background 0.15s;
}
.wf-sb-btn:hover { background: #e0e0e0; }
.wf-sb-separator {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 0 4px;
}
.wf-shoutbox-smileys {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 0;
    max-height: 100px;
    overflow-y: auto;
}
.wf-sb-smiley {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    transition: background 0.1s;
}
.wf-sb-smiley:hover { background: #f0f0f0; border-color: #ddd; }
.wf-shoutbox-input-row {
    display: flex;
    gap: 8px;
}
.wf-shoutbox-input-row .wf-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.wf-shoutbox-input-row .wf-input:focus { border-color: #3498db; }
.wf-shoutbox-input-row .wf-btn-primary {
    padding: 8px 18px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wf-shoutbox-input-row .wf-btn-primary:hover { background: #2980b9; }
.wf-shoutbox-input-row .wf-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.wf-shoutbox-status {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    min-height: 16px;
}
.wf-shoutbox-login-hint {
    padding: 12px 16px;
    text-align: center;
    color: #777;
    font-size: 13px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 600px) {
    .wf-ref-meta { display: none; }
    .wf-ref-levels-grid { grid-template-columns: repeat(3, 1fr); }
    .wf-ref-summary-grid { grid-template-columns: 1fr; }
    .wf-ref-children { padding-left: 16px; margin-left: 8px; }
    .wf-shoutbox-messages { height: 250px; }
    .wf-shoutbox-wrap { max-width: 100%; }
}

/* ═══════════════════════════════════════
   Sponsor — Start Campaign
   ═══════════════════════════════════════ */

.wf-sponsor-start {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--wf-text);
    line-height: 1.5;
}

.wf-sponsor-start h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

.wf-sponsor-start h4 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
}

/* ─── Steps ─── */
.wf-step { margin: 20px 0; }

.wf-step-nav {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ─── Ad Type Card Grid ─── */
.wf-ad-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.wf-ad-type-card {
    background: var(--wf-card-bg);
    border: 2px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 16px 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    position: relative;
}

.wf-ad-type-card:hover {
    border-color: var(--wf-primary);
    transform: translateY(-2px);
    box-shadow: var(--wf-shadow);
}

.wf-ad-type-card.wf-atc-selected {
    border-color: var(--wf-primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wf-atc-icon { font-size: 28px; margin-bottom: 6px; }

.wf-atc-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.wf-atc-meta {
    font-size: 12px;
    color: var(--wf-text-muted);
}

.wf-atc-sep { margin: 0 3px; }

.wf-atc-dim {
    font-size: 11px;
    color: var(--wf-primary);
    font-weight: 600;
    margin-top: 4px;
}

.wf-atc-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 6px;
}

.wf-atc-badge-flatrate {
    background: #dcfce7;
    color: #166534;
}

/* ─── Type Summary ─── */
.wf-type-summary {
    background: #f0f6fc;
    border-left: 4px solid var(--wf-primary);
    padding: 12px 16px;
    border-radius: 0 var(--wf-radius) var(--wf-radius) 0;
    margin-bottom: 16px;
}

/* ─── Booking Type Radios ─── */
.wf-booking-type-field { margin: 16px 0; }

.wf-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 6px;
}

/* ─── Account Type Cards (Registrierung) ─── */
.wf-account-type-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.wf-account-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    border: 2px solid var(--wf-border, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
    text-align: center;
    background: #fff;
}

.wf-account-type-card input[type="radio"] {
    display: none;
}

.wf-account-type-card:hover {
    border-color: var(--wf-primary, #2563eb);
    background: #f0f6ff;
}

.wf-account-type-card.selected,
.wf-account-type-card:has(input:checked) {
    border-color: var(--wf-primary, #2563eb);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.wf-account-type-icon {
    font-size: 2rem;
    line-height: 1;
}

.wf-account-type-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--wf-text, #111827);
}

.wf-account-type-desc {
    font-size: .78rem;
    color: #6b7280;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .wf-account-type-group { grid-template-columns: 1fr 1fr; gap: 8px; }
    .wf-account-type-card { padding: 14px 8px; }
    .wf-account-type-icon { font-size: 1.5rem; }
}

/* ─── Registrierung Willkommens-Hinweis ─── */
.wf-welcome-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .9rem;
}

.wf-welcome-hint-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.wf-welcome-hint strong {
    display: block;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 2px;
}

.wf-welcome-hint span {
    color: #374151;
}

/* ─── Dezente Trennlinie ─── */
.wf-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* ─── Account Type Info Box ─── */
.wf-account-type-info {
    margin-top: 24px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: .88rem;
    color: #374151;
}

.wf-account-type-info-title {
    font-weight: 700;
    font-size: .95rem;
    margin: 0 0 12px 0;
    color: #111827;
}

.wf-account-type-info-list {
    margin: 0 0 12px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wf-account-type-info-list li {
    line-height: 1.5;
    padding-left: 4px;
}

.wf-account-type-info-list strong {
    display: inline-block;
    min-width: 110px;
}

.wf-account-type-info-note {
    margin: 0;
    font-size: .8rem;
    color: #6b7280;
    font-style: italic;
}

.wf-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* ─── Pricing Tables ─── */
.wf-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}

.wf-pricing-table th {
    background: #f3f4f6;
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 2px solid var(--wf-border);
}

.wf-pricing-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--wf-border);
}

.wf-pricing-table tr:hover td {
    background: #f9fafb;
}

/* ─── Field Rows ─── */
.wf-field-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.wf-field-row .wf-field {
    flex: 1 1 200px;
}

.wf-field-hint {
    display: block;
    font-size: 12px;
    color: var(--wf-text-muted);
    margin-top: 4px;
}

/* ─── Cost Calculator ─── */
.wf-cost-calc {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: var(--wf-radius);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 15px;
}

.wf-cost-calc strong {
    margin-right: 8px;
}

#wf-total-cost {
    font-weight: 700;
    font-size: 18px;
    color: var(--wf-primary);
}

/* ─── Banner Upload ─── */
.wf-banner-upload-area {
    margin-top: 8px;
}

.wf-banner-dropzone {
    border: 2px dashed var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.wf-banner-dropzone:hover,
.wf-banner-dropzone.wf-dropzone-hover {
    border-color: var(--wf-primary);
    background: #eff6ff;
}

.wf-dropzone-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
}

.wf-dropzone-text {
    display: block;
    font-size: 14px;
    color: var(--wf-text-muted);
}

.wf-dropzone-hint {
    display: block;
    font-size: 12px;
    color: var(--wf-primary);
    font-weight: 600;
    margin-top: 6px;
}

.wf-banner-preview {
    position: relative;
    display: inline-block;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 8px;
    background: #fff;
}

.wf-banner-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.wf-banner-preview .wf-button-danger {
    position: absolute;
    top: -8px;
    right: -8px;
}

.wf-banner-uploading {
    text-align: center;
    padding: 20px;
    color: var(--wf-text-muted);
    font-size: 14px;
}

/* ─── Textarea ─── */
.wf-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

/* ─── Button small + danger ─── */
.wf-button-small {
    font-size: 12px;
    padding: 4px 10px;
}

.wf-button-danger {
    background: var(--wf-danger);
    color: #fff;
    border: none;
    border-radius: var(--wf-radius);
    cursor: pointer;
}

.wf-button-danger:hover {
    background: #b91c1c;
}

/* ─── Sponsor Responsive ─── */
@media (max-width: 600px) {
    .wf-ad-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wf-ad-type-card { padding: 12px 10px; }
    .wf-atc-icon { font-size: 22px; }
    .wf-atc-name { font-size: 13px; }

    .wf-field-row { flex-direction: column; gap: 0; }
    .wf-radio-group { flex-direction: column; gap: 8px; }

    .wf-pricing-table { font-size: 12px; }
    .wf-pricing-table th,
    .wf-pricing-table td { padding: 6px 8px; }
}

/* ═══════════════════════════════════════════
   My Campaigns — Status Colors
   ═══════════════════════════════════════════ */

/* Status badge colors */
.wf-status-pending  { --wf-status-color: #f59e0b; --wf-status-bg: #fef3c7; --wf-status-text: #92400e; }
.wf-status-active   { --wf-status-color: #22c55e; --wf-status-bg: #dcfce7; --wf-status-text: #166534; }
.wf-status-paused   { --wf-status-color: #3b82f6; --wf-status-bg: #dbeafe; --wf-status-text: #1e40af; }
.wf-status-expired  { --wf-status-color: #9ca3af; --wf-status-bg: #f3f4f6; --wf-status-text: #4b5563; }
.wf-status-rejected { --wf-status-color: #ef4444; --wf-status-bg: #fef2f2; --wf-status-text: #991b1b; }
.wf-status-blocked  { --wf-status-color: #991b1b; --wf-status-bg: #fce4e4; --wf-status-text: #7f1d1d; }
.wf-status-depleted { --wf-status-color: #78716c; --wf-status-bg: #f5f5f4; --wf-status-text: #57534e; }

.wf-badge.wf-status-pending,
.wf-badge.wf-status-active,
.wf-badge.wf-status-paused,
.wf-badge.wf-status-expired,
.wf-badge.wf-status-rejected,
.wf-badge.wf-status-blocked,
.wf-badge.wf-status-depleted {
    background: var(--wf-status-bg);
    color: var(--wf-status-text);
    font-weight: 600;
}

/* ═══ Sponsor Nav ═══ */
.wf-sponsor-nav { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ═══ Campaign Tabs ═══ */
.wf-campaign-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 2px solid #e5e7eb; padding-bottom: 8px; margin-bottom: 16px;
}
.wf-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 6px 6px 0 0;
    font-size: 14px; text-decoration: none; color: #6b7280;
    transition: background 0.15s, color 0.15s;
}
.wf-tab:hover { background: #f3f4f6; color: #111; text-decoration: none; }
.wf-tab-active { background: #f3f4f6; color: #111; font-weight: 600; border-bottom: 2px solid #3b82f6; margin-bottom: -2px; }
.wf-tab-count { font-size: 12px; background: #e5e7eb; color: #4b5563; border-radius: 10px; padding: 1px 7px; }

/* ═══ Campaign Filter ═══ */
.wf-campaign-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.wf-campaign-filter select { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.wf-filter-info { font-size: 13px; color: #9ca3af; }
.wf-inline-form { display: inline; }

/* ═══ Empty State ═══ */
.wf-empty-state { text-align: center; padding: 48px 16px; color: #9ca3af; }
.wf-empty-state p { font-size: 18px; margin-bottom: 16px; }

/* ═══ Campaign Card (list item) ═══ */
.wf-campaign-list { display: flex; flex-direction: column; gap: 12px; }

.wf-campaign-card {
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px;
    border-left: 4px solid var(--wf-status-color, #d1d5db);
    background: #fff; transition: box-shadow 0.15s;
}
.wf-campaign-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.wf-campaign-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.wf-campaign-card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wf-campaign-link { font-size: 16px; font-weight: 600; color: #111; text-decoration: none; }
.wf-campaign-link:hover { color: #3b82f6; text-decoration: underline; }
.wf-campaign-type { font-size: 13px; color: #9ca3af; }

/* ═══ Progress Bar ═══ */
.wf-campaign-progress { margin-bottom: 12px; }
.wf-progress-bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.wf-progress-fill { height: 100%; border-radius: 4px; background: var(--wf-status-color, #3b82f6); transition: width 0.3s; }
.wf-progress-text { font-size: 12px; color: #6b7280; margin-top: 4px; display: block; }
.wf-progress-lg .wf-progress-bar { height: 12px; }
.wf-progress-lg .wf-progress-text { font-size: 14px; }

/* ═══ Stats Row ═══ */
.wf-campaign-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.wf-campaign-stat { text-align: center; }
.wf-stat-label { display: block; font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }
.wf-stat-value { display: block; font-size: 15px; font-weight: 600; color: #111; }

/* ═══ Card Actions ═══ */
.wf-campaign-card-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f3f4f6; flex-wrap: wrap; }

/* ═══ Button Variants ═══ */
.wf-btn-warning { background: #f59e0b; color: #fff; border: none; }
.wf-btn-warning:hover { background: #d97706; }
.wf-btn-success { background: #22c55e; color: #fff; border: none; }
.wf-btn-success:hover { background: #16a34a; }
.wf-btn-info { background: #3b82f6; color: #fff; border: none; }
.wf-btn-info:hover { background: #2563eb; }

/* ═══ Pagination ═══ */
.wf-pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.wf-page-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 14px; color: #374151; text-decoration: none;
}
.wf-page-link:hover { background: #f3f4f6; text-decoration: none; }
.wf-page-active { background: #3b82f6; color: #fff; border-color: #3b82f6; font-weight: 600; }
.wf-page-active:hover { background: #2563eb; }

/* ═══ Campaign Detail ═══ */
.wf-back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; color: #3b82f6; text-decoration: none; }
.wf-back-link:hover { text-decoration: underline; }

.wf-detail-header {
    border-left: 5px solid var(--wf-status-color, #d1d5db);
    padding: 16px 20px; margin-bottom: 16px; border-radius: 8px;
    background: #fafafa;
}
.wf-detail-header h3 { margin: 0 0 8px 0; }
.wf-detail-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wf-campaign-type-badge { font-size: 13px; color: #6b7280; background: #f3f4f6; padding: 2px 10px; border-radius: 4px; }
.wf-detail-id { font-size: 12px; color: #9ca3af; }

.wf-detail-actions { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.wf-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.wf-detail-card {
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; background: #fff;
    margin-bottom: 16px;
}
.wf-detail-card h4 { margin: 0 0 12px 0; font-size: 16px; }

.wf-detail-chart-card { overflow-x: auto; }

.wf-detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wf-detail-table td { padding: 6px 8px; border-bottom: 1px solid #f3f4f6; }
.wf-detail-table td:first-child { color: #6b7280; width: 40%; }
.wf-text-red { color: #ef4444; }
.wf-text-muted { color: #9ca3af; font-style: italic; }

/* ═══ Daily Chart (simple bars) ═══ */
.wf-daily-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; min-width: 500px; }
.wf-chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.wf-chart-bar { width: 100%; max-width: 20px; background: #3b82f6; border-radius: 3px 3px 0 0; transition: height 0.3s; min-height: 2px; }
.wf-chart-label { font-size: 9px; color: #9ca3af; margin-top: 4px; white-space: nowrap; }

/* ═══ Referer Table ═══ */
.wf-table-responsive { overflow-x: auto; }
.wf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wf-table th { text-align: left; padding: 8px; border-bottom: 2px solid #e5e7eb; font-weight: 600; color: #374151; font-size: 13px; }
.wf-table td { padding: 8px; border-bottom: 1px solid #f3f4f6; }
.wf-table-striped tbody tr:nth-child(even) { background: #fafafa; }
.wf-country-flag { font-size: 13px; }

/* ═══ Banner Preview ═══ */
.wf-banner-preview { padding: 12px; background: #f9fafb; border-radius: 6px; text-align: center; overflow: auto; }
.wf-banner-preview img { max-width: 100%; height: auto; }

/* ═══ Modal ═══ */
.wf-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.wf-modal-content { background: #fff; border-radius: 12px; padding: 24px; max-width: 420px; width: 90%; }
.wf-modal-content h4 { margin: 0 0 16px 0; }
.wf-modal-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ═══ Booking AGB / Terms ═══ */
.wf-booking-agb { margin: 20px 0; padding: 16px; background: #f0f6fc; border: 1px solid #c3d9f0; border-radius: 8px; }
.wf-booking-agb-text { margin-bottom: 12px; font-size: 13px; line-height: 1.6; max-height: 200px; overflow-y: auto; padding: 12px; background: #fff; border: 1px solid #ddd; border-radius: 4px; }
.wf-booking-agb-check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.wf-booking-agb-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: #2271b1; cursor: pointer; }

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
    .wf-detail-grid { grid-template-columns: 1fr; }
    .wf-campaign-stats-row { grid-template-columns: repeat(2, 1fr); }
    .wf-campaign-tabs { gap: 2px; }
    .wf-tab { padding: 6px 10px; font-size: 13px; }
}

/* ── GSC Umlauf / Transparenz-Chart ─────────────────────────────── */
.wf-gsc-umlauf { max-width: 960px; margin: 0 auto; }
.wf-gsc-umlauf h2 { font-size: 1.4em; margin-bottom: 8px; }
.wf-gsc-umlauf .wf-info-text { color: #666; margin-bottom: 20px; font-size: 14px; }

.wf-supply-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.wf-supply-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.wf-supply-card--burn { border-top: 3px solid #dc2626; }
.wf-supply-card--vault { border-top: 3px solid #7c3aed; }
.wf-supply-icon { font-size: 24px; margin-bottom: 6px; }
.wf-supply-value { font-size: 18px; font-weight: 700; color: #1e293b; line-height: 1.2; word-break: break-all; }
.wf-supply-label { font-size: 11px; color: #94a3b8; margin-top: 4px; }

.wf-supply-chart-wrap { position: relative; height: 300px; margin-bottom: 20px; }

.wf-supply-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wf-supply-table th,
.wf-supply-table td { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; text-align: right; }
.wf-supply-table th:first-child,
.wf-supply-table td:first-child { text-align: left; }
.wf-supply-table thead th { background: #f8fafc; font-weight: 600; }

/* ── Referral Level Tabs ─────────────────────────── */
.wf-ref-level-tabs {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.wf-ref-ltab {
    display: flex; flex-direction: column; align-items: center;
    padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
    background: #f9fafb; cursor: pointer; font-size: 12px;
    transition: .15s; min-width: 62px;
}
.wf-ref-ltab:hover { background: #f3f4f6; border-color: #9ca3af; }
.wf-ref-ltab.is-active {
    background: var(--ltab-bg, #0d6efd);
    color: var(--ltab-tc, #fff);
    border-color: transparent;
    font-weight: 700;
}
.wf-ref-ltab-num { font-size: 11px; }
.wf-ref-ltab-count {
    font-size: 15px; font-weight: 800; line-height: 1;
    margin-top: 2px;
}
.wf-ref-level-panel {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px;
}
.wf-ref-level-meta {
    display: flex; gap: 20px; flex-wrap: wrap;
    font-size: 13px; color: #374151; margin-bottom: 12px;
    padding: 8px 12px; background: #f9fafb; border-radius: 6px;
}
