* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #000000;
    --primary-dark: #1a1a1a;
    --success: #000000;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-900: #171717;
    --white: #ffffff;
}

body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 300;
}

/* Headings use Manrope */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    flex: 1;
}

/* Header */
.header {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.project-info h1 {
    font-size: 28px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    color: var(--white);
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.client-name {
    font-size: 14px;
    color: var(--gray-300);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header .btn-primary {
    background: var(--white);
    color: var(--gray-900);
}

.header .btn-primary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-primary i, .btn-secondary i {
    width: 16px;
    height: 16px;
}

/* Update Form */
.update-form {
    background: var(--white);
    border: 2px solid var(--gray-900);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: none;
}

.update-form.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.update-form h2 {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 32px;
    color: var(--gray-900);
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.form-group input[type="date"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Sora', sans-serif;
    font-weight: 300;
    transition: all 0.2s;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-600);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.update-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--gray-900);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.update-date {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.update-date i {
    width: 16px;
    height: 16px;
}

.update-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn i {
    width: 16px;
    height: 16px;
    color: var(--gray-600);
}

.icon-btn:hover {
    background: var(--gray-200);
}

.icon-btn.delete:hover {
    background: #fee;
}

.icon-btn.delete:hover i {
    color: #dc2626;
}

.update-content {
    margin-bottom: 16px;
}

.update-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 20px;
    white-space: pre-wrap;
    font-weight: 300;
}

.update-conclusion {
    margin-top: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--success);
}

.update-conclusion strong {
    display: block;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.update-conclusion p {
    font-size: 14px;
    color: var(--gray-700);
}

.update-files {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.file-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview.document {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    padding: 12px;
}

.file-preview.document i {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-bottom: 8px;
}

.file-preview.document span {
    font-size: 11px;
    color: var(--gray-600);
    text-align: center;
    word-break: break-word;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state i {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-600);
}

.empty-state.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .header h1 {
        font-size: 20px;
        font-family: 'Manrope', sans-serif;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }

    .update-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* View Modal */
.view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
    overflow-y: auto;
}

.view-modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px;
    border-bottom: 2px solid var(--gray-200);
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-radius: 20px 20px 0 0;
}

.view-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: var(--white);
}

.close-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn i {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.view-modal-body {
    padding: 48px;
}

.view-date-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    background: var(--gray-900);
    color: var(--white);
    border-radius: 16px;
    margin-bottom: 40px;
}

.view-date-section i {
    width: 32px;
    height: 32px;
}

.view-date-section h3 {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
}

.view-section {
    margin-bottom: 40px;
}

.view-section h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: var(--gray-900);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-900);
}

.view-section h4 i {
    width: 24px;
    height: 24px;
}

.view-content {
    font-size: 17px;
    line-height: 1.9;
    color: var(--gray-700);
    white-space: pre-wrap;
    padding: 24px;
    background: var(--gray-50);
    border-radius: 12px;
    border-left: 4px solid var(--gray-900);
    font-weight: 300;
}

.view-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-preview-large {
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.file-preview-large:hover {
    border-color: var(--gray-900);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.file-preview-large img {
    cursor: pointer;
    transition: transform 0.3s;
}

.file-preview-large:hover img {
    transform: scale(1.05);
}

.file-preview-large img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.file-preview-large.document {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    padding: 32px;
    height: 250px;
}

.file-preview-large.document i {
    width: 56px;
    height: 56px;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.file-name {
    display: block;
    padding: 16px;
    background: var(--gray-50);
    font-size: 14px;
    color: var(--gray-700);
    text-align: center;
    word-break: break-word;
    font-weight: 600;
}

.file-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 600;
}

.file-count i {
    width: 16px;
    height: 16px;
}

/* Responsive for view modal */
@media (max-width: 640px) {
    .view-modal {
        padding: 0;
    }
    
    .view-modal-content {
        border-radius: 0;
        max-height: 100vh;
    }
    
    .view-modal-body {
        padding: 20px;
    }
    
    .view-files {
        grid-template-columns: 1fr;
    }
}

/* Comments Section */
.comments-list {
    margin-bottom: 24px;
}

.comment-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-header strong {
    font-size: 14px;
    color: var(--gray-900);
}

.comment-time {
    font-size: 12px;
    color: var(--gray-600);
}

.comment-text {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
    white-space: pre-wrap;
}

.no-comments {
    text-align: center;
    padding: 24px;
    color: var(--gray-600);
    font-size: 14px;
    font-style: italic;
}

.comment-form {
    background: var(--white);
    border: 2px solid var(--gray-900);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.comment-input,
.comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 12px;
}

.comment-textarea {
    resize: vertical;
}

.comment-input:focus,
.comment-textarea:focus {
    outline: none;
    border-color: var(--gray-900);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.comment-form .btn-primary {
    width: 100%;
    justify-content: center;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--white);
    padding: 20px 0;
    margin-top: 48px;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.footer-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.footer-right {
    text-align: right;
}

.footer-project {
    font-size: 13px;
    color: var(--gray-300);
    margin-bottom: 4px;
    font-weight: 500;
}

.footer-copyright {
    font-size: 12px;
    color: var(--gray-400);
}

@media (max-width: 640px) {
    .header-content {
        padding: 0 20px;
    }
    
    .footer .container {
        padding: 0 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-right {
        text-align: center;
    }
}

/* PIN Modal */
.pin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.pin-modal.active {
    display: flex;
}

.pin-modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.pin-modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.pin-modal-content p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 24px;
    font-weight: 300;
}

#pinInput {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 18px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 24px;
}

#pinInput:focus {
    outline: none;
    border-color: var(--gray-900);
}

.pin-actions {
    display: flex;
    gap: 12px;
}

.pin-actions button {
    flex: 1;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--gray-900);
    color: var(--white);
    border-bottom: 1px solid var(--gray-700);
}

.image-modal-header h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--white);
    word-break: break-word;
    flex: 1;
    margin-right: 16px;
}

.image-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.image-modal-close i {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-modal-body {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    max-height: calc(90vh - 80px);
}

.image-modal-body img {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .image-modal {
        padding: 0;
    }
    
    .image-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .image-modal-header {
        padding: 16px 20px;
    }
    
    .image-modal-header h3 {
        font-size: 16px;
    }
    
    .image-modal-body {
        padding: 10px;
        max-height: calc(100vh - 70px);
    }
    
    .image-modal-body img {
        max-height: calc(100vh - 110px);
    }
}