/* ==============================================
   Leads / CRM Module - Clean Boxed Design
   ============================================== */

/* ==============================================
   Leads Grid
   ============================================== */

.leads-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.leads-toolbar .search-box {
    flex: 1;
    max-width: 400px;
    margin-bottom: 0;
}

.leads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

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

@media (max-width: 768px) {
    .leads-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .leads-toolbar .search-box {
        max-width: 100%;
    }

    .leads-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   Lead Card
   ============================================== */

.lead-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lead-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.lead-card-header {
    padding: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.lead-card-info {
    flex: 1;
    min-width: 0;
}

.lead-card-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.lead-card-role {
    font-size: 12px;
    color: var(--text-tertiary);
}

.lead-card-body {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.lead-card-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 12px;
    color: var(--text-secondary);
    padding: var(--spacing-xs) 0;
}

.lead-card-detail svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.lead-card-detail a {
    color: var(--accent);
    text-decoration: none;
}

.lead-card-detail a:hover {
    text-decoration: underline;
}

.lead-card-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

/* ==============================================
   Lead Detail Layout
   ============================================== */

.lead-detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-xl);
}

.lead-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.lead-detail-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

@media (max-width: 900px) {
    .lead-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   Lead Profile Card
   ============================================== */

.lead-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
}

.lead-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.lead-profile-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

/* ==============================================
   Detail Card (Generic)
   ============================================== */

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.detail-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.detail-card-title svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

.detail-card-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ==============================================
   Info List
   ============================================== */

.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.info-item-link {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.info-item-link:hover {
    color: var(--accent);
}

.info-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-item-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 2;
}

.info-item-link:hover .info-item-icon {
    background: var(--accent-soft);
}

.info-item-link:hover .info-item-icon svg {
    stroke: var(--accent);
}

.info-item-text {
    flex: 1;
    min-width: 0;
}

/* ==============================================
   Back Link
   ============================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-tertiary);
    font-size: 12px;
    text-decoration: none;
    margin-bottom: var(--spacing-sm);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ==============================================
   Requests
   ============================================== */

.requests-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.request-card {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.request-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.request-card-body {
    padding: var(--spacing-lg);
}

.request-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.request-criterion {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.request-criterion svg {
    width: 12px;
    height: 12px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 2;
}

.request-notes {
    margin: var(--spacing-md) 0 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.request-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    font-size: 11px;
}

.request-actions {
    display: flex;
    gap: var(--spacing-xs);
}

/* ==============================================
   Empty State Inline
   ============================================== */

.empty-state-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--text-tertiary);
}

.empty-state-inline p {
    font-size: 13px;
    margin: 0 0 var(--spacing-md);
}

/* ==============================================
   Text Helpers
   ============================================== */

.text-muted {
    color: var(--text-tertiary);
}

.text-sm {
    font-size: 12px;
}

/* ==============================================
   Contact Type Colors
   ============================================== */

/* Badge Type Styling */
.badge-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon svg {
    width: 12px;
    height: 12px;
}

/* Club - Blue */
.badge-type-club {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.lead-card-club {
    border-color: rgba(59, 130, 246, 0.3);
    border-left: 4px solid #3b82f6;
}

.lead-card-club:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.lead-card-club .lead-card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
}

/* Coach - Green */
.badge-type-coach {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.lead-card-coach {
    border-color: rgba(34, 197, 94, 0.3);
    border-left: 4px solid #22c55e;
}

.lead-card-coach:hover {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.15);
}

.lead-card-coach .lead-card-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, transparent 100%);
}

/* Agent - Purple */
.badge-type-agent {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.lead-card-agent {
    border-color: rgba(168, 85, 247, 0.3);
    border-left: 4px solid #a855f7;
}

.lead-card-agent:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

.lead-card-agent .lead-card-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, transparent 100%);
}

/* Scout - Orange */
.badge-type-scout {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.lead-card-scout {
    border-color: rgba(249, 115, 22, 0.3);
    border-left: 4px solid #f97316;
}

.lead-card-scout:hover {
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.15);
}

.lead-card-scout .lead-card-header {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, transparent 100%);
}

/* Other - Gray */
.badge-type-other {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.lead-card-other {
    border-color: rgba(107, 114, 128, 0.3);
    border-left: 4px solid #6b7280;
}

.lead-card-other:hover {
    border-color: rgba(107, 114, 128, 0.5);
    box-shadow: 0 4px 20px rgba(107, 114, 128, 0.15);
}

.lead-card-other .lead-card-header {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08) 0%, transparent 100%);
}

/* Dark mode adjustments */
[data-theme="dark"] .badge-type-club {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

[data-theme="dark"] .lead-card-club {
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .lead-card-club .lead-card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .badge-type-coach {
    background: rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

[data-theme="dark"] .lead-card-coach {
    border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="dark"] .lead-card-coach .lead-card-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .badge-type-agent {
    background: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

[data-theme="dark"] .lead-card-agent {
    border-color: rgba(168, 85, 247, 0.4);
}

[data-theme="dark"] .lead-card-agent .lead-card-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .badge-type-scout {
    background: rgba(249, 115, 22, 0.25);
    color: #fb923c;
}

[data-theme="dark"] .lead-card-scout {
    border-color: rgba(249, 115, 22, 0.4);
}

[data-theme="dark"] .lead-card-scout .lead-card-header {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .badge-type-other {
    background: rgba(156, 163, 175, 0.25);
    color: #9ca3af;
}

[data-theme="dark"] .lead-card-other {
    border-color: rgba(156, 163, 175, 0.4);
}

[data-theme="dark"] .lead-card-other .lead-card-header {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15) 0%, transparent 100%);
}
