/* V2 PORTFOLIO STYLES */

/* 1. Portfolio Grid (Companies) */
.portfolio-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.p-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.p-card {
    position: relative;
}

.p-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Drag Handle */
.p-card-drag-handle {
    display: none;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: #9ca3af;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.p-card-drag-handle:hover {
    background: white;
    color: #374151;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.p-card-drag-handle:active {
    cursor: grabbing;
    color: var(--primary, #4f6ef7);
}

/* Mostrar handles quan drag està activat */
.drag-enabled .p-card-drag-handle {
    display: flex;
}

/* Estat: arrossegant */
.p-card.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

/* Estat: objectiu del drop */
.p-card.drag-over {
    border: 2px dashed var(--primary, #4f6ef7);
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.15);
}

.p-card-banner {
    height: 80px;
    background-color: #333;
    position: relative;
}

.p-card-content {
    padding: 15px;
    padding-top: 40px;
    /* Space for logo overlap */
    position: relative;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p-card-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: -30px;
    /* Overlap banner */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.p-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.p-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.p-card-sector {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
}

.p-card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 2. Projects List (Inside Company Editor) */
.projects-list-grid {
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    max-height: 400px;
    overflow-y: auto;
}

.project-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}

.project-item-row:last-child {
    border-bottom: none;
}

.project-item-row:hover {
    background: #f9f9f9;
}

.badge-cat {
    background: #eef2ff;
    color: #4f46e5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* 3. Project Editor Modal specific */
.tags-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.cat-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.cat-checkbox-item:has(input:checked) {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
}

.cat-checkbox-item input {
    accent-color: #0284c7;
}

/* 4. Portfolio Header & Sort Controls */
.portfolio-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
}

.btn-sort {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-sort:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-sort.active {
    background: white;
    color: var(--primary, #4f6ef7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 5. Sector Group Headers */
.sector-group {
    margin-bottom: 24px;
}

.sector-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.sector-group-header i {
    color: var(--primary, #4f6ef7);
    font-size: 0.9rem;
}

.sector-group-count {
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

/* ============================================ */
/* 6. COMPANY PROFILE VIEW (Twitter/LinkedIn)   */
/* ============================================ */

/* Back bar */
.profile-back-bar {
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-back i {
    font-size: 0.85rem;
}

/* Cover/Banner */
.company-cover-section {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.cover-image-area {
    width: 100%;
    height: 100%;
    background-color: #333;
    background-size: cover;
    background-position: center;
}

.cover-edit-btn {
    position: absolute;
    bottom: 12px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.cover-edit-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.1);
}

/* Profile Header */
.company-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 24px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.profile-avatar-wrapper {
    position: relative;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    background: white;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.avatar-edit-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.1);
}

.profile-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 50px;
}

.btn-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-icon-circle:hover {
    background: #f3f4f6;
    color: var(--primary, #4f6ef7);
    border-color: var(--primary, #4f6ef7);
}

/* Company Info */
.company-profile-info {
    padding: 16px 24px 20px;
}

.company-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
}

.company-profile-desc {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0 0 12px 0;
    line-height: 1.5;
    max-width: 600px;
}

.company-profile-tags {
    font-size: 0.85rem;
    color: var(--primary, #4f6ef7);
    font-weight: 500;
}

/* Projects Section */
.company-projects-section {
    padding: 0 24px 30px;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}

.projects-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 16px;
}

.projects-section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Projects Gallery Grid */
.projects-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.project-gallery-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.project-gallery-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-gallery-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
}

.project-gallery-info {
    padding: 12px 14px;
}

.project-gallery-info h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.project-gallery-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.project-gallery-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ============================================ */
/* 7. MODALS                                    */
/* ============================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-card {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.25s ease-out;
}

.modal-sm {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.modal-form {
    padding: 20px 24px 24px;
}

.modal-form .form-group {
    margin-bottom: 16px;
}

.modal-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.modal-form input[type="text"],
.modal-form input[type="url"],
.modal-form input[type="email"],
.modal-form input[type="tel"],
.modal-form input[type="number"],
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1f2937;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--primary, #4f6ef7);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
    background: white;
}

.modal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-form .btn-primary {
    width: 100%;
    margin-top: 8px;
}

/* Cover edit specifics */
.cover-edit-options {
    padding: 20px 24px 24px;
}

.cover-edit-options .form-group {
    margin-bottom: 16px;
}

.cover-edit-options label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.cover-edit-options input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.cover-edit-options input[type="text"]:focus {
    outline: none;
    border-color: var(--primary, #4f6ef7);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.cover-edit-options .btn-primary {
    width: 100%;
    margin-top: 8px;
}

.cover-divider {
    text-align: center;
    position: relative;
    margin: 18px 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.cover-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.cover-divider span {
    position: relative;
    background: white;
    padding: 0 12px;
}

/* ============================================ */
/* Helpers                                      */
/* ============================================ */
.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.text-red {
    color: #ef4444;
}

.text-red:hover {
    background: #fee2e2;
}

/* ============================================ */
/* 8. FILE UPLOAD                               */
/* ============================================ */

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6b7280;
    transition: all 0.2s;
    text-align: center;
}

.file-upload-label:hover {
    border-color: var(--primary, #4f6ef7);
    color: var(--primary, #4f6ef7);
    background: #f0f4ff;
}

.file-upload-label.has-file {
    border-color: #10b981;
    color: #10b981;
    background: #ecfdf5;
}

.file-upload-label i {
    font-size: 1.1rem;
}

.file-preview {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e5e7eb;
}

/* ============================================ */
/* 9. PROJECT EDITOR (WYSIWYG - Halo Lab style) */
/* ============================================ */

/* Sticky header bar */
.proj-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 50;
}

.btn-back-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-back-project:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.proj-editor-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.proj-editor-status {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

/* Scrollable body */
.proj-editor-body {
    padding: 0 0 60px 0;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Cover image area */
.proj-editor-cover {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.proj-editor-cover.has-image {
    background-color: transparent;
}

.proj-editor-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.proj-editor-cover:hover .proj-editor-cover-overlay {
    opacity: 1;
}

.proj-cover-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.proj-cover-upload-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Title input */
.proj-title-input {
    width: 100%;
    padding: 24px 32px 12px;
    border: none;
    outline: none;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    font-family: inherit;
    background: transparent;
    box-sizing: border-box;
}

.proj-title-input::placeholder {
    color: #d1d5db;
}

/* Meta row */
.proj-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 32px 16px;
    align-items: center;
}

.proj-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.9rem;
}

.proj-meta-item i {
    font-size: 0.85rem;
    color: #9ca3af;
}

.proj-meta-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: #374151;
    font-family: inherit;
    min-width: 200px;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
    transition: border-color 0.2s;
}

.proj-meta-input:focus {
    border-bottom-color: var(--primary, #4f6ef7);
}

.proj-meta-input::placeholder {
    color: #9ca3af;
}

.proj-meta-cats-toggle {
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    user-select: none;
}

.proj-meta-cats-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Categories dropdown */
.proj-cats-dropdown {
    padding: 0 32px 16px;
}

/* Quill editor wrapper */
.proj-quill-wrapper {
    padding: 0 32px;
    margin-bottom: 40px;
}

.proj-quill-wrapper .ql-toolbar {
    border: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
    background: #fafafa;
    position: sticky;
    top: 60px;
    z-index: 10;
}

.proj-quill-wrapper .ql-container {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 10px 10px;
    font-size: 1rem;
    font-family: inherit;
}

.proj-quill-wrapper .ql-editor {
    min-height: 400px;
    padding: 24px;
    line-height: 1.7;
    color: #374151;
}

.proj-quill-wrapper .ql-editor h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    margin: 24px 0 12px;
}

.proj-quill-wrapper .ql-editor h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin: 20px 0 10px;
}

.proj-quill-wrapper .ql-editor h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #374151;
    margin: 16px 0 8px;
}

.proj-quill-wrapper .ql-editor p {
    margin-bottom: 12px;
}

.proj-quill-wrapper .ql-editor img {
    max-width: 100%;
    border-radius: 10px;
    margin: 16px 0;
}

.proj-quill-wrapper .ql-editor blockquote {
    border-left: 4px solid var(--primary, #4f6ef7);
    padding-left: 16px;
    color: #6b7280;
    font-style: italic;
    margin: 16px 0;
}

.proj-quill-wrapper .ql-editor .ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    margin: 16px 0;
}

/* ============================================ */
/* 10. PUBLIC PROJECT MODAL (Halo Lab style)    */
/* ============================================ */

.project-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-modal-backdrop.active {
    opacity: 1;
}

.project-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: projModalIn 0.35s ease-out;
    position: relative;
}

@keyframes projModalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Cover */
.modal-cover-image {
    width: 100%;
    height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.modal-cover-image .company-badge {
    position: absolute;
    bottom: 16px;
    left: 20px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.modal-cover-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* Body */
.modal-body-content {
    padding: 32px 36px 40px;
}

.modal-proj-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.modal-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
}

.meta-pill i {
    font-size: 0.8rem;
    color: #9ca3af;
}

.modal-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0 0 28px 0;
}

/* Rich text content display */
.modal-rich-text {
    line-height: 1.8;
    color: #374151;
    font-size: 1.05rem;
}

.modal-rich-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    margin: 28px 0 12px;
}

.modal-rich-text h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin: 24px 0 10px;
}

.modal-rich-text h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #374151;
    margin: 20px 0 8px;
}

.modal-rich-text p {
    margin-bottom: 14px;
}

.modal-rich-text img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    display: block;
}

.modal-rich-text blockquote {
    border-left: 4px solid var(--primary, #4f6ef7);
    padding: 12px 20px;
    color: #6b7280;
    font-style: italic;
    margin: 20px 0;
    background: #f9fafb;
    border-radius: 0 8px 8px 0;
}

.modal-rich-text iframe,
.modal-rich-text .ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin: 20px 0;
    border: none;
}

.modal-rich-text ul,
.modal-rich-text ol {
    margin: 12px 0;
    padding-left: 24px;
}

.modal-rich-text li {
    margin-bottom: 6px;
}

.modal-rich-text a {
    color: var(--primary, #4f6ef7);
    text-decoration: underline;
}

/* PDF embed link style */
.modal-rich-text .pdf-embed,
.proj-quill-wrapper .ql-editor .pdf-embed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-weight: 500;
    text-decoration: none;
    margin: 12px 0;
    transition: all 0.2s;
}

.modal-rich-text .pdf-embed:hover {
    background: #fee2e2;
}

/* Responsive */
@media (max-width: 768px) {
    .proj-editor-cover { height: 180px; }
    .proj-title-input { font-size: 1.5rem; padding: 16px 20px 8px; }
    .proj-meta-row { padding: 8px 20px 12px; }
    .proj-quill-wrapper { padding: 0 16px; }
    .proj-cats-dropdown { padding: 0 20px 12px; }
    .modal-cover-image { height: 200px; }
    .modal-body-content { padding: 24px 20px 30px; }
    .modal-proj-title { font-size: 1.6rem; }
    .modal-rich-text { font-size: 1rem; }
}