.cxp-portal {
    display: flex;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.cxp-portal-sidebar {
    width: 250px;
    background: #1e293b;
    color: #fff;
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
}

.cxp-portal-content {
    flex: 1;
    padding: 30px;
    background: #f8fafc;
}

.cxp-portal-user {
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
    margin-bottom: 20px;
}

.cxp-user-avatar img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
}

.cxp-user-info {
    margin-top: 10px;
}

.cxp-user-name {
    font-weight: 600;
    font-size: 16px;
}

.cxp-portal-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cxp-nav-item {
    display: block;
    padding: 12px 15px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.cxp-nav-item:hover {
    background: #334155;
    color: #fff;
}

.cxp-nav-item.active {
    background: #3b82f6;
    color: #fff;
}

.cxp-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cxp-overview-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-card-icon {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #3b82f6;
}

.cxp-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.cxp-card-label {
    font-size: 14px;
    color: #64748b;
}

.cxp-card-sub {
    font-size: 14px;
    color: #3b82f6;
    font-weight: 600;
}

.cxp-project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.cxp-project-header h1 {
    margin: 0;
}

.cxp-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cxp-badge-pending { background: #fef3c7; color: #92400e; }
.cxp-badge-scoped { background: #dbeafe; color: #1e40af; }
.cxp-badge-awaiting_payment { background: #fee2e2; color: #991b1b; }
.cxp-badge-in_progress { background: #dbeafe; color: #1e40af; }
.cxp-badge-awaiting_review { background: #ede9fe; color: #5b21b6; }
.cxp-badge-completed { background: #d1fae5; color: #065f46; }
.cxp-badge-closed { background: #e5e7eb; color: #374151; }

.cxp-badge-invoice-sent { background: #fee2e2; color: #991b1b; }
.cxp-badge-invoice-paid { background: #d1fae5; color: #065f46; }
.cxp-badge-invoice-void { background: #e5e7eb; color: #374151; }
.cxp-badge-invoice-draft { background: #fef3c7; color: #92400e; }

.cxp-badge-payment { background: #d1fae5; color: #065f46; }
.cxp-badge-refund { background: #fee2e2; color: #991b1b; }

.cxp-status-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.cxp-progress-step::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.cxp-progress-step:last-child::after {
    display: none;
}

.cxp-progress-step.completed .cxp-step-indicator {
    background: #3b82f6;
    border-color: #3b82f6;
}

.cxp-progress-step.current .cxp-step-indicator {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.cxp-step-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    margin: 0 auto 10px;
    position: relative;
    z-index: 1;
}

.cxp-step-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
}

.cxp-progress-step.completed .cxp-step-label,
.cxp-progress-step.current .cxp-step-label {
    color: #1e293b;
    font-weight: 600;
}

.cxp-project-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-project-card h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 16px;
}

.cxp-scope-actions,
.cxp-completion-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cxp-scope-confirmed {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #065f46;
    font-weight: 500;
}

.cxp-paid-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #065f46;
    font-weight: 500;
}

.cxp-form-group {
    margin-bottom: 20px;
}

.cxp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.cxp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cxp-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.cxp-form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.cxp-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

.cxp-projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cxp-projects-table,
.cxp-invoices-table,
.cxp-transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-projects-table th,
.cxp-projects-table td,
.cxp-invoices-table th,
.cxp-invoices-table td,
.cxp-transactions-table th,
.cxp-transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.cxp-projects-table th,
.cxp-invoices-table th,
.cxp-transactions-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.cxp-comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cxp-comment-item {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

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

.cxp-comment-author {
    font-weight: 600;
    color: #1e293b;
}

.cxp-comment-date {
    font-size: 12px;
    color: #94a3b8;
}

.cxp-comment-body {
    color: #475569;
}

.cxp-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cxp-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #3b82f6;
    text-decoration: none;
}

.cxp-back-link:hover {
    text-decoration: underline;
}

.cxp-star-rating {
    display: flex;
    gap: 5px;
}

.cxp-star {
    font-size: 24px;
    cursor: pointer;
    color: #d1d5db;
}

.cxp-star.active,
.cxp-star:hover {
    color: #f59e0b;
}

.cxp-transactions-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.cxp-summary-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-summary-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
}

.cxp-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.cxp-empty {
    padding: 40px;
    text-align: center;
    color: #64748b;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-loading {
    text-align: center;
    color: #64748b;
    padding: 20px;
}

.cxp-activity-feed {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cxp-activity-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.cxp-activity-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .cxp-portal {
        flex-direction: column;
    }
    
    .cxp-portal-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .cxp-portal-content {
        margin-left: 0;
    }
    
    .cxp-status-progress {
        flex-direction: column;
        gap: 15px;
    }
    
    .cxp-progress-step::after {
        display: none;
    }
    
    .cxp-form-row {
        grid-template-columns: 1fr;
    }
    
    .cxp-transactions-summary {
        grid-template-columns: 1fr;
    }
}
