/* 
   P2P KOLs - Components
   Buttons, Cards, Forms, Badges, Alerts, Modals
*/

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,255,136,0.3);
    color: var(--bg-primary);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.btn-danger {
    background: rgba(255,51,102,0.2);
    border: 1px solid rgba(255,51,102,0.3);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: rgba(255,51,102,0.3);
    border-color: var(--accent-red);
}

.btn-warning {
    background: linear-gradient(135deg, #ff6600, #ff9900);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff7711, #ffaa11);
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-xl { width: 100%; padding: 1.25rem 2rem; font-size: 1.1rem; }

.btn-icon {
    font-size: 1.25rem;
}

/* Role-specific buttons */
.btn-blogger {
    background: var(--gradient-blogger);
    color: #000;
}

.btn-client {
    background: var(--gradient-client);
    color: #fff;
}

/* ================= CARDS ================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-value.green { color: var(--accent-primary); }
.stat-value.blue { color: var(--accent-secondary); }
.stat-value.purple { color: var(--accent-purple); }
.stat-value.orange { color: var(--accent-orange); }
.stat-value.red { color: var(--accent-red); }

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-sub {
    margin-top: 0.25rem;
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 100, 100, 0.1));
    border: 1px solid rgba(255, 165, 0, 0.3);
}

/* Clickable stat cards */
.stat-link {
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .stats-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .stats-4 {
        grid-template-columns: 1fr;
    }
}

/* Task Cards */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.task-card:hover {
    border-color: var(--border-glow);
    transform: translateX(4px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.task-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.task-budget {
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

/* ================= FORMS ================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0,255,136,0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: var(--text-muted);
}

.checkbox-item input {
    accent-color: var(--accent-primary);
}

.checkbox-item.checked {
    border-color: var(--accent-primary);
    background: rgba(0,255,136,0.1);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input {
    margin-top: 0.2rem;
}

/* ================= BADGES ================= */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
}

.badge-pending {
    background: rgba(255,102,0,0.2);
    color: var(--accent-orange);
}

.badge-accepted, .badge-success {
    background: rgba(0,255,136,0.2);
    color: var(--accent-primary);
}

.badge-rejected, .badge-error {
    background: rgba(255,51,102,0.2);
    color: var(--accent-red);
}

.badge-paid, .badge-info {
    background: rgba(0,204,255,0.2);
    color: var(--accent-secondary);
}

/* Type Badges */
.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.type-badge.like { background: rgba(255, 99, 132, 0.2); color: #ff6384; }
.type-badge.follow { background: rgba(54, 162, 235, 0.2); color: #36a2eb; }
.type-badge.comment { background: rgba(255, 206, 86, 0.2); color: #ffce56; }
.type-badge.shill { background: rgba(75, 192, 192, 0.2); color: #4bc0c0; }

/* Mode Badges */
.mode-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.mode-badge.auto { background: rgba(0, 255, 136, 0.2); color: var(--accent-primary); }
.mode-badge.manual { background: rgba(255, 165, 0, 0.2); color: var(--accent-orange); }

/* Verified Badge */
.verified-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

/* Nav Badge */
.nav-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: auto;
    min-width: 1.25rem;
    text-align: center;
}

.nav-badge.red { background: var(--accent-red); color: white; }
.nav-badge.green { background: var(--accent-primary); color: var(--bg-primary); }
.nav-badge.orange { background: var(--accent-orange); color: white; }
.nav-badge.muted { background: var(--text-muted); color: white; }

.nav-badges {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

/* ================= ALERTS ================= */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(0,255,136,0.1);
    border: 1px solid rgba(0,255,136,0.3);
    color: var(--accent-primary);
}

.alert-error {
    background: rgba(255,51,102,0.1);
    border: 1px solid rgba(255,51,102,0.3);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(255,102,0,0.1);
    border: 1px solid rgba(255,102,0,0.3);
    color: var(--accent-orange);
}

.alert-info {
    background: rgba(0,204,255,0.1);
    border: 1px solid rgba(0,204,255,0.3);
    color: var(--accent-secondary);
}

/* ================= MODALS ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-warning {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.modal-warning .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-warning .warning-text strong {
    color: var(--accent-orange);
    display: block;
    margin-bottom: 0.5rem;
}

.modal-warning .warning-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-warning .warning-text ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.modal-warning .warning-text li {
    margin-bottom: 0.25rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* ================= EMPTY STATE ================= */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ================= PROFILE GRID ================= */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.profile-item {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.profile-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.profile-value {
    font-weight: 500;
    word-break: break-all;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= TWITTER LINK ================= */
.twitter-link {
    color: var(--accent-secondary);
}

/* ================= STATUS DOT ================= */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active { background: var(--accent-primary); }
.status-dot.paused { background: var(--accent-orange); }
.status-dot.completed { background: var(--text-muted); }
.status-dot.cancelled { background: var(--accent-red); }

/* ================= PROGRESS BAR ================= */
.progress-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-fill.purple { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.progress-fill.blue { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.progress-fill.orange { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* ================= INFO CARDS ================= */
.info-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.info-icon {
    font-size: 1.25rem;
}

.info-title {
    font-weight: 500;
}

.info-item {
    background: var(--bg-input);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
}

.info-value.green {
    color: var(--accent-primary);
}

