/**
 * Scouting Portal - Modern Professional Design
 * Clean, data-rich interface for prospect intelligence
 */

/* Hero Section */
.scouting-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.scouting-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.15), transparent 60%),
        radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.12), transparent 65%);
    pointer-events: none;
}

.scouting-hero .page-hero__meta,
.scouting-hero .metric-grid {
    position: relative;
    z-index: 2;
}

.page-hero__meta {
    margin-bottom: 2rem;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* Metric Grid */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.metric-card-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.metric-card > span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.metric-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metric-value-wrapper strong {
    font-size: 42px;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -1px;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 14px;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.metric-trend.positive {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.metric-trend svg {
    width: 14px;
    height: 14px;
}

.metric-progress {
    margin-bottom: 0.75rem;
}

.metric-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.metric-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.metric-progress-fill.excellent {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.metric-progress-fill.good {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.metric-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Section */
.section-block {
    padding: 2rem;
    background: #f8fafc;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.section-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Layout */
.scouting-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

/* Filter Panel */
.filter-panel {
    position: sticky;
    top: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-panel h2 {
    margin: 0 0 1.5rem 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel h2::before {
    content: "🔍";
    font-size: 18px;
}

.filter-panel form {
    display: grid;
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.3px;
}

.form-field select,
.form-field input {
    padding: 0.625rem 0.875rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
}

.form-field select:focus,
.form-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.form-actions button {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.form-actions button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.form-actions button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.form-actions button.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.form-actions button.secondary:hover {
    background: #e2e8f0;
}

/* Workspace */
.workspace {
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(400px, 1.2fr) minmax(320px, 0.9fr);
    gap: 2rem;
    align-items: start;
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.results-scroll {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.results-scroll::-webkit-scrollbar {
    width: 8px;
}

.results-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.results-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.results-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Result Cards */
.result-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e2e8f0;
    transition: all 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

.result-card.active {
    border-color: #3b82f6;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.result-card.fit-excellent::before {
    background: linear-gradient(180deg, #22c55e, #16a34a);
}

.result-card.fit-excellent {
    border-color: rgba(34, 197, 94, 0.3);
}

.result-card.fit-good::before {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.result-card.fit-good {
    border-color: rgba(59, 130, 246, 0.3);
}

.result-card.fit-average::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.result-card.fit-average {
    border-color: rgba(245, 158, 11, 0.3);
}

.result-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(2deg);
}

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

.result-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.fit-chip {
    font-size: 20px;
    font-weight: 800;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.fit-chip.fit-excellent {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #16a34a;
}

.fit-chip.fit-good {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}

.fit-chip.fit-average {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #d97706;
}

.result-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}

.metric-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.625rem;
    font-size: 13px;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Detail Panel */
.detail-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.detail-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.detail-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.detail-meta {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-grid {
    display: grid;
    gap: 1.75rem;
}

.detail-grid section {
    min-width: 0;
}

.section-title-inline {
    margin: 0 0 0.875rem 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
}

.note-item {
    padding: 1rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    color: #334155;
    margin-bottom: 0.75rem;
}

.media-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.media-item:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

/* Comparison Panel */
.comparison-panel {
    position: sticky;
    top: 20px;
    background: white;
    border: 2px solid rgba(147, 51, 234, 0.2);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.08);
}

.comparison-panel h3 {
    margin: 0 0 1.25rem 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-panel h3::before {
    content: "⚡";
    font-size: 18px;
}

.comparison-drop-zone {
    padding: 2rem 1.25rem;
    border: 3px dashed rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    background: rgba(147, 51, 234, 0.03);
    transition: all 0.2s ease;
    margin-bottom: 1.25rem;
}

.comparison-drop-zone:hover,
.comparison-drop-zone.drag-over {
    border-color: rgba(147, 51, 234, 0.5);
    background: rgba(147, 51, 234, 0.08);
    transform: scale(1.02);
}

.comparison-drop-zone > div:first-child {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.comparison-grid {
    display: grid;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.comparison-player-card {
    position: relative;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.comparison-player-card .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.comparison-player-card .remove-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
}

.comparison-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comparison-player-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.comparison-player-meta {
    font-size: 12px;
    color: #64748b;
}

.action-row {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.action-row button {
    padding: 0.625rem 1.125rem;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.action-row button:not(.secondary) {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.25);
}

.action-row button:not(.secondary):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.35);
}

.action-row button.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.action-row button.secondary:hover {
    background: #e2e8f0;
}

/* Empty State */
.results-empty {
    padding: 3rem 1.5rem;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: white;
}

/* Footer */
.page-footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.6);
    padding: 2rem;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-version {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 1440px) {
    .workspace {
        grid-template-columns: minmax(340px, 1fr) minmax(340px, 1fr);
    }
    .comparison-panel {
        grid-column: 1 / -1;
        position: static;
    }
}

@media (max-width: 1024px) {
    .scouting-layout {
        grid-template-columns: 1fr;
    }
    .filter-panel {
        position: static;
    }
    .workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    .metric-grid {
        grid-template-columns: 1fr;
    }
}
