/**
 * Recruiter Portal Styles
 * Premium design matching the Senna brand
 */

:root {
    --rp-primary: #18181b;
    --rp-primary-hover: #27272a;
    --rp-accent: #b8860b;
    --rp-accent-hover: #996f00;
    --rp-success: #059669;
    --rp-danger: #dc2626;
    --rp-bg: #ffffff;
    --rp-bg-subtle: #fafafa;
    --rp-border: #e4e4e7;
    --rp-text: #18181b;
    --rp-text-muted: #71717a;
    --rp-radius: 8px;
    --rp-radius-lg: 12px;
    --rp-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --rp-shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

/* Portal Container */
.sffc-recruiter-portal {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.sffc-rp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rp-border);
}

.sffc-rp-welcome h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--rp-text);
}

.sffc-rp-welcome p {
    margin: 0;
    color: var(--rp-text-muted);
    font-size: 15px;
}

/* Stats */
.sffc-rp-stats {
    display: flex;
    gap: 16px;
}

.sffc-rp-stat {
    background: var(--rp-bg-subtle);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    padding: 16px 20px;
    text-align: center;
    min-width: 80px;
}

.sffc-rp-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--rp-text);
}

.sffc-rp-stat-label {
    display: block;
    font-size: 11px;
    color: var(--rp-text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

.sffc-rp-stat.sffc-rp-stat-pending .sffc-rp-stat-value {
    color: var(--rp-accent);
}

/* Filters */
.sffc-rp-filters {
    margin-bottom: 24px;
}

.sffc-rp-filters select {
    padding: 10px 16px;
    font-size: 14px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-bg);
    color: var(--rp-text);
    min-width: 200px;
}

/* Loading State */
.sffc-rp-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--rp-text-muted);
}

.sffc-rp-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--rp-border);
    border-top-color: var(--rp-accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: rp-spin 0.8s linear infinite;
}

@keyframes rp-spin {
    to { transform: rotate(360deg); }
}

/* Introduction Cards */
.sffc-rp-intro-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sffc-rp-intro-card {
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sffc-rp-intro-card:hover {
    box-shadow: var(--rp-shadow-lg);
    border-color: var(--rp-primary);
}

.sffc-rp-intro-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--rp-bg-subtle);
    border-bottom: 1px solid var(--rp-border);
}

.sffc-rp-candidate-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--rp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 20px;
    flex-shrink: 0;
}

.sffc-rp-candidate-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sffc-rp-candidate-info {
    flex: 1;
    min-width: 0;
}

.sffc-rp-candidate-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--rp-text);
    margin: 0 0 4px 0;
}

.sffc-rp-candidate-headline {
    font-size: 14px;
    color: var(--rp-text-muted);
    margin: 0;
}

.sffc-rp-candidate-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--rp-text-muted);
}

.sffc-rp-candidate-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sffc-rp-match-score {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.sffc-rp-match-score.high {
    background: #d1fae5;
    color: #065f46;
}

.sffc-rp-match-score.medium {
    background: #fef3c7;
    color: #92400e;
}

.sffc-rp-match-score.low {
    background: #fee2e2;
    color: #991b1b;
}

/* Intro Body */
.sffc-rp-intro-body {
    padding: 20px;
}

.sffc-rp-job-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--rp-text-muted);
}

.sffc-rp-job-info strong {
    color: var(--rp-text);
}

.sffc-rp-message {
    background: var(--rp-bg-subtle);
    border-radius: var(--rp-radius);
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--rp-text);
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.sffc-rp-message-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--rp-text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Actions */
.sffc-rp-intro-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--rp-bg-subtle);
    border-top: 1px solid var(--rp-border);
}

.sffc-rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--rp-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.sffc-rp-btn-primary {
    background: var(--rp-success);
    color: #fff;
}

.sffc-rp-btn-primary:hover {
    background: #047857;
}

.sffc-rp-btn-secondary {
    background: var(--rp-bg);
    color: var(--rp-text);
    border: 1px solid var(--rp-border);
}

.sffc-rp-btn-secondary:hover {
    background: var(--rp-bg-subtle);
    border-color: var(--rp-primary);
}

.sffc-rp-btn-danger {
    background: var(--rp-bg);
    color: var(--rp-danger);
    border: 1px solid var(--rp-border);
}

.sffc-rp-btn-danger:hover {
    background: #fef2f2;
    border-color: var(--rp-danger);
}

.sffc-rp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sffc-rp-view-cv {
    margin-left: auto;
}

/* Response Form */
.sffc-rp-response-form {
    padding: 20px;
    background: var(--rp-bg-subtle);
    border-top: 1px solid var(--rp-border);
}

.sffc-rp-response-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-text);
    margin-bottom: 8px;
}

.sffc-rp-response-form textarea {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    resize: vertical;
    min-height: 80px;
    margin-bottom: 12px;
}

.sffc-rp-response-form textarea:focus {
    outline: none;
    border-color: var(--rp-accent);
}

.sffc-rp-response-btns {
    display: flex;
    gap: 12px;
}

/* Status Badge */
.sffc-rp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.sffc-rp-status-accepted {
    background: #d1fae5;
    color: #065f46;
}

.sffc-rp-status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.sffc-rp-status-awaiting {
    background: #fef3c7;
    color: #92400e;
}

/* Empty State */
.sffc-rp-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--rp-bg-subtle);
    border-radius: var(--rp-radius-lg);
    border: 1px solid var(--rp-border);
}

.sffc-rp-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--rp-text-muted);
}

.sffc-rp-empty h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--rp-text);
}

.sffc-rp-empty p {
    margin: 0;
    color: var(--rp-text-muted);
}

/* Login Required */
.sffc-rp-login-required {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.sffc-rp-login-card {
    text-align: center;
    max-width: 400px;
    padding: 48px 32px;
    background: var(--rp-bg);
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius-lg);
    box-shadow: var(--rp-shadow-lg);
}

.sffc-rp-login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--rp-accent);
}

.sffc-rp-login-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--rp-text);
}

.sffc-rp-login-card p {
    margin: 0 0 16px;
    color: var(--rp-text-muted);
}

.sffc-rp-login-hint {
    font-size: 13px;
}

.sffc-rp-login-hint a {
    color: var(--rp-accent);
}

/* Notifications */
.sffc-rp-notification {
    padding: 14px 20px;
    border-radius: var(--rp-radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: rp-slide-down 0.3s ease-out;
}

@keyframes rp-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sffc-rp-notification-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.sffc-rp-notification-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 768px) {
    .sffc-rp-header {
        flex-direction: column;
    }

    .sffc-rp-stats {
        width: 100%;
        justify-content: space-between;
    }

    .sffc-rp-stat {
        flex: 1;
        min-width: auto;
        padding: 12px;
    }

    .sffc-rp-intro-header {
        flex-wrap: wrap;
    }

    .sffc-rp-match-score {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 12px;
    }

    .sffc-rp-intro-actions {
        flex-direction: column;
    }

    .sffc-rp-view-cv {
        margin-left: 0;
    }
}
