/* أنماط السير الذاتية - الواجهة الأمامية */

/* شارات الحالة */
.cv-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.cv-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.cv-status-draft {
    background: #e2e8f0;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

/* السير الذاتية للمستخدم */
.cv-user-submissions {
    margin: 40px 0;
}

.cv-submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cv-submission-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cv-submission-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.cv-item-header h4 {
    margin: 0;
    color: #2d3748;
    flex: 1;
}

.cv-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.status-published {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #feebc8;
    color: #744210;
}

.status-draft {
    background: #e2e8f0;
    color: #4a5568;
}

.cv-item-content {
    margin-bottom: 15px;
}

.cv-item-job {
    color: #667eea;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cv-item-email, .cv-item-date {
    margin: 5px 0;
    font-size: 14px;
    color: #718096;
}

.cv-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cv-item-actions .button {
    padding: 6px 12px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-view {
    background: #667eea;
    color: white;
}

.button-edit {
    background: #ed8936;
    color: white;
}

.button-delete {
    background: #e53e3e;
    color: white;
}

.cv-no-submissions {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

.cv-no-submissions p {
    margin: 0 0 20px 0;
    color: #718096;
}

/* بقية الأنماط تبقى كما هي مع بعض التحسينات */
.cv-search-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
}

.cv-search-form .search-input-group {
    display: flex;
    max-width: 600px;
    margin: 0 auto 20px;
}

.cv-search-form .cv-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.cv-search-form .cv-search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-search-form .cv-search-btn:hover {
    background: #5a6fd8;
}

.cv-search-form .cv-filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cv-search-form .cv-filter-select {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-width: 180px;
    background: white;
}

/* نماذج الإرسال */
.cv-submit-form-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cv-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.cv-form-header h2 {
    color: #2d3748;
    margin-bottom: 10px;
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.section-title {
    color: #2d3748;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error-field,
.form-group select.error-field,
.form-group textarea.error-field {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

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

.field-description {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

.cv-repeater-frontend {
    margin-bottom: 15px;
}

.repeater-item {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.repeater-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-repeater-item {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 12px;
    transition: background 0.3s ease;
}

.remove-repeater-item:hover {
    background: #c53030;
}

.button-secondary {
    background: #718096;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.button-secondary:hover {
    background: #4a5568;
}

.skill-range-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-range {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.skill-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.skill-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.skill-value {
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
    text-align: center;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    min-width: 200px;
    position: relative;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #38a169;
}

.submit-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.form-message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.cv-submission-restricted {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.auth-buttons .button {
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-buttons .button-primary {
    background: #667eea;
    color: white;
}

.auth-buttons .button-primary:hover {
    background: #5a6fd8;
}

/* البطاقات المميزة */
.cv-featured-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    color: white;
}

.section-description {
    font-size: 1.2em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.cv-featured-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

.cv-featured-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #2d3748;
}

.cv-featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.cv-card-header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    text-align: center;
}

.cv-card-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
}

.cv-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ffd700;
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.cv-card-body {
    padding: 25px;
}

.cv-card-name {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    text-align: center;
}

.cv-card-name a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cv-card-name a:hover {
    color: #667eea;
}

.cv-card-job {
    color: #667eea;
    font-weight: 600;
    text-align: center;
    margin: 0 0 10px 0;
}

.cv-card-location {
    text-align: center;
    color: #718096;
    margin: 0 0 15px 0;
}

.cv-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.skill-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.skill-more {
    color: #667eea;
    font-size: 12px;
    font-weight: 600;
}

.cv-card-footer {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cv-view-btn, .cv-contact-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cv-view-btn {
    background: #667eea;
    color: white;
}

.cv-view-btn:hover {
    background: #5a6fd8;
}

.cv-contact-btn {
    background: #48bb78;
    color: white;
}

.cv-contact-btn:hover {
    background: #38a169;
}

.cv-featured-actions {
    text-align: center;
    margin-top: 40px;
}

.cv-featured-actions .button {
    margin: 0 10px;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cv-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
}

/* السير الذاتية الحديثة */
.cv-recent-section {
    margin: 40px 0;
}

.cv-recent-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.cv-recent-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.cv-recent-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cv-recent-name {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.cv-recent-name a {
    color: #2d3748;
    text-decoration: none;
}

.cv-recent-name a:hover {
    color: #667eea;
}

.cv-recent-job {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.cv-recent-date {
    margin: 0;
    font-size: 11px;
    color: #718096;
}

.cv-recent-footer {
    text-align: center;
    margin-top: 20px;
}

/* التصنيفات */
.cv-categories-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 40px 0;
}

.cv-categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.categories-column h4 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 1.2em;
}

.categories-list {
    display: grid;
    gap: 8px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.category-count {
    background: #e2e8f0;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.category-item:hover .category-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* أزرار التحكم */
.cv-control-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: center;
}

.cv-control-buttons .button {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.cv-control-buttons .button:hover {
    background: #5a6fd8;
}

.cv-control-buttons .delete-cv-btn {
    background: #e53e3e;
}

.cv-control-buttons .delete-cv-btn:hover {
    background: #c53030;
}

/* التجاوب */
@media (max-width: 768px) {
    .cv-featured-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cv-submissions-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-search-form .search-input-group {
        flex-direction: column;
    }
    
    .cv-search-form .cv-search-input {
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .cv-search-form .cv-search-btn {
        border-radius: 8px;
        justify-content: center;
    }
    
    .cv-search-form .cv-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 2em;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cv-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cv-item-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cv-recent-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-featured-actions .button {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
    
    .cv-card-footer {
        flex-direction: column;
    }
    
    .cv-submit-form-wrapper {
        padding: 20px;
    }
    
    .form-section {
        padding: 15px;
    }
}

/* تحسينات الطباعة */
@media print {
    .cv-control-buttons,
    .cv-search-form,
    .cv-featured-actions {
        display: none !important;
    }
    
    .cv-featured-section {
        background: white !important;
        color: #2d3748 !important;
        padding: 20px 0 !important;
    }
    
    .cv-featured-card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}